Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-06-21, 21:42


SkateR121

F-A-C-K J-U






Wiek: 29
Na forum: 5456 dni
Posty: 46
Nick w MP: SkateR

Piwa: 976

Respekt: 43,4

Ostrzeżeń: 100%
Jak w?aczy? narzendzie lub jaka funkcja odpowiada z ustawianie obiekt?w na graczu ?

Podpis

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-21, 22:40


ToFFiK12

U-RP S-RP






Wiek: 36
Na forum: 5589 dni
Posty: 65
Nick w MP: Nevis

Piwa: 115

Respekt: 28,5

AttachObjectToPlayer

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-22, 19:46


SkateR121

F-A-C-K J-U






Wiek: 29
Na forum: 5456 dni
Posty: 46
Nick w MP: SkateR

Piwa: 976

Respekt: 43,4

Ostrzeżeń: 100%
Nie nie o to mi chodzi,chodzi mi o to co wesz?o w funkcji 03e. ?e masz te 3 obrazki i ustawiasz nimi naprzyk?ad czapke itp.

Podpis

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-22, 20:05


optimus

PawnoMen






Wiek: 27
Na forum: 5614 dni
Posty: 453
Nick w MP: [PMS]ReveresPL

Piwa: 159

Respekt: 59

Ostrzeżeń: 80%
To daj fotke

Podpis
Prpgramujesz w Unity i potrzebujesz pomocy?
|?Zapraszamy na forum Unity?|
http://www.unity3d.ugu.pl
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-22, 21:28


siemol

[MAX_PLAYERS];






Wiek: 29
Na forum: 5408 dni
Posty: 23
Nick w MP: Gun

Piwa: 8

Respekt: 50

Mo?e widzieli?cie edytowanie obiekt?w na elsce lub pridzie? Tak, oto mu w?asnie chodzi. (chyba) kwadraciki kt?re s? na dmach po prawej stronie, do edycji obiektu. W chenges na pridzie mo?ecie to zauwa?y?. Postaram si? to zdoby?, edytuje sw?j post jak znajd? kod.

Mam czy chodzi Ci o:
Pawn
EditAttachedObject
?


Pawn
 public OnPlayerEditAttachedObjectplayeridresponseindexmodelidboneid,
                                   Float:fOffsetXFloat:fOffsetYFloat:fOffsetZ,
                                   Float:fRotXFloat:fRotYFloat:fRotZ,
                                   Float:fScaleXFloat:fScaleYFloat:fScaleZ )
{
    new debug_string[256+1];
    format(debug_string,256,"SetPlayerAttachedObject(playerid,%d,%d,%d,%f,%f,%f,%f,%f,%f,%f,%f,%f)",
        index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);

    print(debug_string);
    //SendClientMessage(playerid, 0xFFFFFFFF, debug_string);
    
    SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
    SendClientMessage(playerid0xFFFFFFFF"You finished editing an attached object");
    
    return 1;
}
Zwyk?y kod 'AttachmentObjects'.



Pawn
 new AttachmentObjects[][AttachmentEnum] = {
{18632"FishingRod"},
{18633"GTASAWrench1"},
{18634"GTASACrowbar1"},
{18635"GTASAHammer1"},
{18636"PoliceCap1"},
{19346"hotdog01"},
{19347"badge01"},
{19348"cane01"},
{19349"monocle01"},
{19350"moustache01"},
{19351"moustache02"},
{19352"tophat01"},
{19487"tophat02"},
{19488"HatBowler6"},
{19513"whitephone"}
};
To jest dodatek do kodu, zreszt? kod mo?esz zdoby? w bardzo ?atwy spos?b.




---- Te? dalsza cz???.

Pawn
public OnPlayerCommandText(playeridcmdtext[])
{
    CMD:ustaw(playerid,cmdtext[]){
        new string[128];
        for(new x;x<MAX_PLAYER_ATTACHED_OBJECTS;x++)
        {
            if(IsPlayerAttachedObjectSlotUsed(playeridx)) format(stringsizeof(string), "%s%d (Used)\n"stringx);
            else format(stringsizeof(string), "%s%d\n"stringx);
        }
        ShowPlayerDialog(playeridDIALOG_ATTACH_INDEX_SELECTIONDIALOG_STYLE_LIST\
        "{FF0000}Attachment Modification - Index Selection"string"Select""Cancel");
        return 1;
    }
    return 0;
}

public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(dialogid)
    {
        case DIALOG_ATTACH_INDEX_SELECTION:
        {
            if(response)
            {
                if(IsPlayerAttachedObjectSlotUsed(playeridlistitem))
                {
                    ShowPlayerDialog(playeridDIALOG_ATTACH_EDITREPLACEDIALOG_STYLE_MSGBOX\
                    "{FF0000}Attachment Modification""Do you wish to edit the attachment in that slot, or delete it?""Edit""Delete");
                }
                else
                {
                    new string[4000+1];
                    for(new x;x<sizeof(AttachmentObjects);x++)
                    {
                        format(stringsizeof(string), "%s%s\n"stringAttachmentObjects[x][attachname]);
                    }
                    ShowPlayerDialog(playeridDIALOG_ATTACH_MODEL_SELECTIONDIALOG_STYLE_LIST\
                    "{FF0000}Attachment Modification - Model Selection"string"Select""Cancel");
                }
                SetPVarInt(playerid"AttachmentIndexSel"listitem);
            }
            return 1;
        }
        case DIALOG_ATTACH_EDITREPLACE:
        {
            if(responseEditAttachedObject(playeridGetPVarInt(playerid"AttachmentIndexSel"));
            else RemovePlayerAttachedObject(playeridGetPVarInt(playerid"AttachmentIndexSel"));
            DeletePVar(playerid"AttachmentIndexSel");
            return 1;
        }
        case DIALOG_ATTACH_MODEL_SELECTION:
        {
            if(response)
            {
                if(GetPVarInt(playerid"AttachmentUsed") == 1EditAttachedObject(playeridlistitem);
                else
                {
                    SetPVarInt(playerid"AttachmentModelSel"AttachmentObjects[listitem][attachmodel]);
                    new string[256+1];
                    for(new x;x<sizeof(AttachmentBones);x++)
                    {
                        format(stringsizeof(string), "%s%s\n"stringAttachmentBones[x]);
                    }
                    ShowPlayerDialog(playeridDIALOG_ATTACH_BONE_SELECTIONDIALOG_STYLE_LIST\
                    "{FF0000}Attachment Modification - Bone Selection"string"Select""Cancel");
                }
            }
            else DeletePVar(playerid"AttachmentIndexSel");
            return 1;
        }
        case DIALOG_ATTACH_BONE_SELECTION:
        {
            if(response)
            {
                SetPlayerAttachedObject(playeridGetPVarInt(playerid"AttachmentIndexSel"), GetPVarInt(playerid"AttachmentModelSel"), listitem+1);
                EditAttachedObject(playeridGetPVarInt(playerid"AttachmentIndexSel"));
                SendClientMessage(playerid0xFFFFFFFF"Hint: Use {FFFF00}~k~~PED_SPRINT~{FFFFFF} to look around.");
            }
            DeletePVar(playerid"AttachmentIndexSel");
            DeletePVar(playerid"AttachmentModelSel");
            return 1;
        }
    }
    return 0;
}


Pawn
 new AttachmentBones[][24] = {
{"Spine"},
{"Head"},
{"Left upper arm"},
{"Right upper arm"},
{"Left hand"},
{"Right hand"},
{"Left thigh"},
{"Right thigh"},
{"Left foot"},
{"Right foot"},
{"Right calf"},
{"Left calf"},
{"Left forearm"},
{"Right forearm"},
{"Left clavicle"},
{"Right clavicle"},
{"Neck"},
{"Jaw"}
};


Zdefiniuj jescze dialogi, include a_samp [najnowsze 0.3e] oraz zcmd [ja u?y?em].

Dodaj jescze
Pawn
enum AttachmentEnum
{
    attachmodel,
    attachname[24]
}



OPISA?EM CI TO POD GAMEMODA, SKRYPT CA?Y MO?E CI NIE Z??CZYC Z GF-EM.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-23, 10:13


SkateR121

F-A-C-K J-U






Wiek: 29
Na forum: 5456 dni
Posty: 46
Nick w MP: SkateR

Piwa: 976

Respekt: 43,4

Ostrzeżeń: 100%
Mo?e by? ale kod posiada du?o b?ed?w,musia?em poprawi? czy tam nie ma przypadkiem troche kodu z html-u <span> itp

Podpis

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-23, 18:05


siemol

[MAX_PLAYERS];






Wiek: 29
Na forum: 5408 dni
Posty: 23
Nick w MP: Gun

Piwa: 8

Respekt: 50

"SkateR121" napisał/a:

Mo?e by? ale kod posiada du?o b?ed?w,musia?em poprawi? czy tam nie ma przypadkiem troche kodu z html-u <span> itp



Nie.

Co do obiekt?w, np. kreatora IG.
- Mo?esz w bardzo ?atwy spos?b u?y? streamera.

- Zast?pi? [jak masz] kreator ig. [z mapek Karolowy, jak korzystasz]

To jest przyk?ad od sampa, ja si? tym bawi?em jak znajd? ca?y kod, podsune Ci go na pw. Tutaj jest na pierd??ki, kapelusze, okulary etc.

Postaw piwo autorowi tego posta
 

 
Tagi: narzedzie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [INNE] Narzedzie Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku