#1

hi, how can i make a timer for a cmd ?
INI script pls not mysql this is the cmd

if (strcmp(cmdtext, "/armura", true)==0)
{
if(PlayerInfo[playerid][pDonateRank] >= 4)
{
SetPlayerArmour(playerid, 100.0);
if(armuratime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Doar o data pe Cont.");
SendClientMessage(playerid, COLOR_GREY,"[PREMIUM]: Ai primit Armura mai poti folosi dupa 10 minute.");
SetTimerEx("armurat", 600000, 0, "%d", playerid);
return 1;
}
}
i have a timer but is not working
Reply
#2

pawn Код:
if (strcmp(cmdtext, "/armura", true)==0)
{
    if(PlayerInfo[playerid][pDonateRank] >= 4)
    {
        SetPlayerArmour(playerid, 100);
        if(armuratime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Doar o data pe Cont.");
        SendClientMessage(playerid, COLOR_GREY,"[PREMIUM]: Ai primit Armura mai poti folosi dupa 10 minute.");
        SetTimerEx("armurat", 600000, 0, "i", playerid);
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "Nu esti Donator");
    }
    return 1;
}
Reply
#3

pawn Код:
if (strcmp(cmdtext, "/armura", true)==0)
{    
if(PlayerInfo[playerid][pDonateRank] >= 4)
{        
SetPlayerArmour(playerid, 100);
if(armuratime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Doar o data pe Cont.");        SendClientMessage(playerid, COLOR_GREY,"[PREMIUM]: Ai primit Armura mai poti folosi dupa 10 minute.");        SetTimerEx("armurat", 600000, 0, "i", playerid);
}    
else
{
SendClientMessage(playerid, COLOR_GREY, "Nu esti Donator");
    }    
return 1;
}
Reply
#4

no cmd is working i have this

forward armurat(playerid);
new armuratime[MAX_PLAYERS];

end of gm:
public armurat(playerid)
{
armuratime[playerid] = 0;
}

under cmd:
if(bantime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "** Are you trying to ban this server?");
armuratime[playerid] = 1;
SetTimerEx("armurat", 600000, 0, "%d", playerid);

this is my time system
Reply
#5

np i found something armuratime[playerid] = 1;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)