Command Timer Help!
#3

Quote:
Originally Posted by Pablo Borsellino
View Post
Here, without any timers

At the top of the Script:
pawn Code:
new WaitTimeForCMD[MAX_PLAYERS];
OnPlayerCommandText:
pawn Code:
if(!strcmp("/vr", cmdtext, true))
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        if((GetTickCount()-WaitTimeForCMD[playerid])>120000)return SendClientMessage(playerid,RED,"ERROR: Wait 2Minutes to use this CMD again!");
        new VehicleID;
        VehicleID = GetPlayerVehicleID(playerid);
        RepairVehicle(VehicleID);
        WaitTimeForCMD[playerid]=GetTickCount();
        return SendClientMessage(playerid,YELLOW," Sucessfully Fixed The Vehicle ");
    }
    else return SendClientMessage(playerid,RED,"ERROR: You are not in a Vehicle!");
}
what is gettickcount is that settimer
Reply


Messages In This Thread
Command Timer Help! - by Niko_boy - 21.03.2011, 14:23
AW: Command Timer Help! - by Pablo Borsellino - 21.03.2011, 14:27
Re: AW: Command Timer Help! - by Niko_boy - 21.03.2011, 14:37
AW: Command Timer Help! - by Pablo Borsellino - 21.03.2011, 14:51

Forum Jump:


Users browsing this thread: 3 Guest(s)