Is there a quicker way of doing this ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Is there a quicker way of doing this ? (
/showthread.php?tid=331382)
Is there a quicker way of doing this ? -
Scripter12345 - 04.04.2012
Im making it so when you do /buyclothes a dialog pops up and what ever skins ID you put in there box your skins changes to that ID
Im doing it like this
Код:
if(dialogid == DIALOG_BUYCLOTHES)
{
if(response)
{
new clothes = strval(inputtext);
if(clothes == 1)
{
SetPlayerSkin(playerid, 1);
SaveAccountStats(playerid);
SendClientMessage(playerid, COLOR_GOLD, "Skin changed");
}
else
{
if(clothes == 2)
{
SetPlayerSkin(playerid, 2);
SaveAccountStats(playerid);
SendClientMessage(playerid, COLOR_GOLD, "Skin changed");
}
}
}
}
}
Is there a quicker way of doing this
Please Help Please
Re: Is there a quicker way of doing this ? -
Cjgogo - 04.04.2012
Are you checking all skins possible in SA world?:O,ok lol.Yes there is a faster way:
pawn Код:
SetPlayerSkin(playerid,clothes);
And for the last time use PAWN tags,please.(IN FORUM,when you paste in the box instead of code and /code use pawn and /pawn please)
Re: Is there a quicker way of doing this ? -
Scripter12345 - 04.04.2012
Quote:
Originally Posted by Cjgogo
Are you checking all skins possible in SA world?:O,ok lol.Yes there is a faster way:
pawn Код:
SetPlayerSkin(playerid,clothes);
And for the last time use PAWN tags,please.(IN FORUM,when you paste in the box instead of code and /code use pawn and /pawn please)
|
So would it be something like this
pawn Код:
if(dialogid == DIALOG_BUYCLOTHES)
{
if(response)
{
new clothes = strval(inputtext);
if(clothes == 1)
if(clothes == 2)
if(clothes == 3)
{
SetPlayerSkin(playerid, clothes);
SaveAccountStats(playerid);
SendClientMessage(playerid, COLOR_GOLD, "Skin changed");
}
}
}
}
}
Re: Is there a quicker way of doing this ? -
Scripter12345 - 04.04.2012
I just tried doing it the way i just aid but it did not work
Was it meant to work ?
Re: Is there a quicker way of doing this ? -
IstuntmanI - 04.04.2012
Use this:
Код:
if( dialogid == DIALOG_BUYCLOTHES )
{
if( !response )
return 1;
SetPlayerSkin( playerid, strval( inputtext ) );
SaveAccountStats( playerid );
SendClientMessage( playerid, COLOR_GOLD, "Skin changed" );
return 1;
}