30.07.2011, 14:47
in givecash command i have put like this
if(IsNumeric(tmp)){
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /givecash (id) (amount) Amouint Must Be Number");
return 1;
}
all is work every thing but when i try to take money from player when i do like this
/givecash 1 -1000
its tell like that
USAGE: /givecash (id) (amount) Amouint Must Be Number
now how i can make this Code IsNumeric accept that thing -
if(IsNumeric(tmp)){
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /givecash (id) (amount) Amouint Must Be Number");
return 1;
}
all is work every thing but when i try to take money from player when i do like this
/givecash 1 -1000
its tell like that
USAGE: /givecash (id) (amount) Amouint Must Be Number
now how i can make this Code IsNumeric accept that thing -
Код:
IsNumeric(const string[]) { for (new i = 0, j = strlen(string); i < j; i++) { if (string[i] > '9' || string[i] < '0') { return 0; } } return 1; }