buy skin help
#1

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
Reply
#2

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!");
Reply
#3

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!");
Reply
#4

you can't use || && lol
"or and"
pawn Код:
if(strval(inputtext) == 280 || strval(inputtext) == 281)
{
  SendClientMessage(playerid, 0x999999AA, "You can't use this skin.");
}
Reply
#5

I edit my post. Read it
Reply
#6

thanks all
Reply
#7

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)
Reply
#8

Yes sorry lol... I'm confusing.
Reply
#9

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
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)