Possible to add a string in SetTimer?
#1

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.
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;
    }
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
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)