19.02.2010, 15:36
Don was faster :S nvm read it again
You could use sscanf 1.0, too (can be found in the wiki -> sscanf)
It was only put into a plugin because there it got extra functions and it is way faster
But if you dont want to use anything new for you use that crap - it's limited from 0 till 99
Quote:
Originally Posted by lRaged
Quote:
|
It was only put into a plugin because there it got extra functions and it is way faster
But if you dont want to use anything new for you use that crap - it's limited from 0 till 99
pawn Код:
if(strcmp("/handsup", cmdtext, true, 8) == 0 && (cmdtext[8] == EOS || cmdtext[8] == ' '))
{
if(cmdtext[8] == ' ' && '0' <= cmdtext[9] && cmdtext[9] <= '9')
switch(((cmdtext[10] != EOS) ? (((cmdtext[9] - '0') * 10) + (cmdtext[10] - '0')) : (cmdtext[9] - '0')))
{
case 1: return ApplyAnimation(playerid, "ROB_BANK", "SHP_HandsUp_Scr", 4.1, 0, 0, 0, 1, 1);
case 2: return ApplyAnimation(playerid, "PED", "handsup", 4.1, 0, 0, 0, 1, 1);
}
return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /handsup [1-2]");
}