Command Timer Help!
#2

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!");
}
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: 2 Guest(s)