Wysłany: 2012-06-21, 21:42
SkateR121
F-A-C-K J-U
Wiek: 29 Na forum: 5457 dni Posty: 46
Nick w MP: SkateR
Piwa : 976
Jak w?aczy? narzendzie lub jaka funkcja odpowiada z ustawianie obiekt?w na graczu ?
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
Wysłany: 2012-06-22, 19:46
SkateR121
F-A-C-K J-U
Wiek: 29 Na forum: 5457 dni Posty: 46
Nick w MP: SkateR
Piwa : 976
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.
Wysłany: 2012-06-22, 20:05
optimus
PawnoMen
Wiek: 27 Na forum: 5614 dni Posty: 453
Nick w MP: [PMS]ReveresPL
Piwa : 159
Wysłany: 2012-06-22, 21:28
siemol
[MAX_PLAYERS];
Wiek: 29 Na forum: 5408 dni Posty: 23
Nick w MP: Gun
Piwa : 8
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 ?
Pawn public OnPlayerEditAttachedObject ( playerid , response , index , modelid , boneid ,
Float : fOffsetX , Float : fOffsetY , Float : fOffsetZ ,
Float : fRotX , Float : fRotY , Float : fRotZ ,
Float : fScaleX , Float : fScaleY , Float : 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 ( playerid , 0xFFFFFFFF , "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 ( playerid , cmdtext [])
{
CMD : ustaw ( playerid , cmdtext []){
new string [ 128 ];
for(new x ; x < MAX_PLAYER_ATTACHED_OBJECTS ; x ++)
{
if( IsPlayerAttachedObjectSlotUsed ( playerid , x )) format ( string , sizeof (string), "%s%d (Used)\n" , string , x );
else format ( string , sizeof (string), "%s%d\n" , string , x );
}
ShowPlayerDialog ( playerid , DIALOG_ATTACH_INDEX_SELECTION , DIALOG_STYLE_LIST , \
"{FF0000}Attachment Modification - Index Selection" , string , "Select" , "Cancel" );
return 1 ;
}
return 0 ;
}
public OnDialogResponse ( playerid , dialogid , response , listitem , inputtext [])
{
switch( dialogid )
{
case DIALOG_ATTACH_INDEX_SELECTION :
{
if( response )
{
if( IsPlayerAttachedObjectSlotUsed ( playerid , listitem ))
{
ShowPlayerDialog ( playerid , DIALOG_ATTACH_EDITREPLACE , DIALOG_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 ( string , sizeof (string), "%s%s\n" , string , AttachmentObjects [ x ][ attachname ]);
}
ShowPlayerDialog ( playerid , DIALOG_ATTACH_MODEL_SELECTION , DIALOG_STYLE_LIST , \
"{FF0000}Attachment Modification - Model Selection" , string , "Select" , "Cancel" );
}
SetPVarInt ( playerid , "AttachmentIndexSel" , listitem );
}
return 1 ;
}
case DIALOG_ATTACH_EDITREPLACE :
{
if( response ) EditAttachedObject ( playerid , GetPVarInt ( playerid , "AttachmentIndexSel" ));
else RemovePlayerAttachedObject ( playerid , GetPVarInt ( playerid , "AttachmentIndexSel" ));
DeletePVar ( playerid , "AttachmentIndexSel" );
return 1 ;
}
case DIALOG_ATTACH_MODEL_SELECTION :
{
if( response )
{
if( GetPVarInt ( playerid , "AttachmentUsed" ) == 1 ) EditAttachedObject ( playerid , listitem );
else
{
SetPVarInt ( playerid , "AttachmentModelSel" , AttachmentObjects [ listitem ][ attachmodel ]);
new string [ 256 + 1 ];
for(new x ; x < sizeof ( AttachmentBones ); x ++)
{
format ( string , sizeof (string), "%s%s\n" , string , AttachmentBones [ x ]);
}
ShowPlayerDialog ( playerid , DIALOG_ATTACH_BONE_SELECTION , DIALOG_STYLE_LIST , \
"{FF0000}Attachment Modification - Bone Selection" , string , "Select" , "Cancel" );
}
}
else DeletePVar ( playerid , "AttachmentIndexSel" );
return 1 ;
}
case DIALOG_ATTACH_BONE_SELECTION :
{
if( response )
{
SetPlayerAttachedObject ( playerid , GetPVarInt ( playerid , "AttachmentIndexSel" ), GetPVarInt ( playerid , "AttachmentModelSel" ), listitem + 1 );
EditAttachedObject ( playerid , GetPVarInt ( playerid , "AttachmentIndexSel" ));
SendClientMessage ( playerid , 0xFFFFFFFF , "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.
Wysłany: 2012-06-23, 10:13
SkateR121
F-A-C-K J-U
Wiek: 29 Na forum: 5457 dni Posty: 46
Nick w MP: SkateR
Piwa : 976
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
Wysłany: 2012-06-23, 18:05
siemol
[MAX_PLAYERS];
Wiek: 29 Na forum: 5408 dni Posty: 23
Nick w MP: Gun
Piwa : 8
"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.
Tagi: narzedzie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: