SA-MP Forums Archive
ID 0 - 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: ID 0 (/showthread.php?tid=84547)



ID 0 - Ribber - 01.07.2009

Hi i have a question.
How can i make, that the giveplayerid only a number is.
example: /ban dfsdfs cheat
than it bans playerid 0, because i typed dfsdfs.


Re: ID 0 - refshal - 01.07.2009

What do you exactly mean with that?


Re: ID 0 - Ribber - 01.07.2009

so actually in my script is a /ban command from my admin fs.
if i type /ban abc Cheat he mean "abc" is id 0 and then bann id 0.


Re: ID 0 - BMUK - 01.07.2009

pawn Код:
stock IsNumeric(const string[])
{
  for (new i = 0, j = strlen(string); i < j; i++)
  {
    if (string[i] > '9' || string[i] < '0') return 0;
  }
  return 1;
}
pawn Код:
if(!IsNumeric(string)) return SendClientMessage(playerid,COLOR_RED,"Only Numbers!");
(Credits to whoever made it)


Re: ID 0 - Ribber - 01.07.2009

ty i test it soon