#1

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

What do you exactly mean with that?
Reply
#3

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.
Reply
#4

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

ty i test it soon
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)