29.03.2012, 03:28
(
Последний раз редактировалось nickdodd25; 04.04.2012 в 03:19.
)
Well as the tittle states is it possible to add a string to SetTimer in the time param? Heres a command i have been making and i am deffinatly doing it wrong. Just need a little assistance.
And if it is possible how would i make it so if some one does "/rs bla bla" instead of "/rs 20" it says something along the lines of this "Please Only use numbers"?
Thanks
Nick
pawn Код:
if(!strcmp(cmdtext, "/rs", true, 3))
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,Color_Red, "Only admins can use this command");
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /reload [minutes]");
new str[128];
format(str, sizeof(str), "%s", cmdtext[5]);
Timer1 = SetTimer("Timer_Restart_Kick", 1000 * 60* str, false);
return 1;
}
Thanks
Nick