buy skin help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: buy skin help (
/showthread.php?tid=249955)
buy skin help -
CrazyBlob - 21.04.2011
k i made a buyskin dialog input but you can choose skins like 280 = cop how do i disable this on 1line ex
Код:
if(strval(inputtext) >= 280) || && strval(inputtext) >= 281))
thanks
Re: buy skin help -
mitosking - 21.04.2011
pawn Код:
if(strval(inputtext) == 280) return SendClientMessage(playerid, -1, "ERROR: Don't choose this skin!");
EDIT: For all skin between 280 - 288 use:
pawn Код:
if(strval(inputtext) >= 280 || strval(inputtext) <= 288) return SendClientMessage(playerid, -1, "ERROR: Don't choose this skin!");
Re: buy skin help -
CrazyBlob - 21.04.2011
Quote:
Originally Posted by mitosking
pawn Код:
if(strval(inputtext) == 280) return SendClientMessage(playerid, -1, "ERROR: Don't choose this skin!");
|
thanks how do i do it all on one line like this
Код:
if(strval(inputtext) == 280) && strval(inputtext) == 281) return SendClientMessage(playerid, -1, "ERROR: Don't choose this skin!");
Re: buy skin help -
Sascha - 21.04.2011
you can't use || && lol
"or and"
pawn Код:
if(strval(inputtext) == 280 || strval(inputtext) == 281)
{
SendClientMessage(playerid, 0x999999AA, "You can't use this skin.");
}
Re: buy skin help -
mitosking - 21.04.2011
I edit my post. Read it
Re: buy skin help -
CrazyBlob - 21.04.2011
thanks all
Re: buy skin help -
Sascha - 21.04.2011
wrong lol
Quote:
Originally Posted by mitosking
pawn Код:
if(strval(inputtext) == 280) return SendClientMessage(playerid, -1, "ERROR: Don't choose this skin!");
EDIT: For all skin between 280 - 288 use:
pawn Код:
if(strval(inputtext) >= 280 || strval(inputtext) <= 288) return SendClientMessage(playerid, -1, "ERROR: Don't choose this skin!");
|
won't work...
you need to use &&
pawn Код:
if(strval(inputtext) >= 280 && strval(inputtext) <= 288)
Re: buy skin help -
mitosking - 21.04.2011
Yes sorry lol... I'm confusing.
Re: buy skin help -
CrazyBlob - 21.04.2011
bump dint work fml
can somebody just post a code?
im trying to make it so you cant buy SKINS:
Код:
163 | 164 | 165 | 166 | 265 | 266| 267 | 269 | 270 | 271 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288
thanks
Re: buy skin help -
Sascha - 21.04.2011
pawn Код:
new ForbiddenSkin[]
{
163, 164, 165, 166, 265, 266, 267, 269, 270, 271, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288
};
on your dialog:
pawn Код:
for(new n=0; n<sizeof(ForbiddenSkin); n++)
{
if(strval(inputtext) == ForbiddenSkin[n])
{
SendClientMessage(playerid, 0x999999AA, "Forbidden Skin");
}
}
try this