CMD Disable
#1

Well the timer is working but i dunno how to disable the command till the timer runs out. ;/
PHP код:
CMD:dropcar(playeridparams[])
{
    new 
string[128];
    new 
vehicleid GetPlayerVehicleID(playerid);
    if(!
IsPlayerLoggedIn(playerid)) return SendClientMessage(playeridCOLOR_GREY"You need to login first before using any command.");
    if(!
vehicleid) return SendClientMessage(playeridCOLOR_GREY"You must be inside a vehicle to use this command.");
    else if(
dropping[playerid] == false)
    {
        
format(stringsizeof(string), "You need to wait {FF6347}%d{33CCFF} more seconds before doing dropcar again."DropTime[playerid]);
        
SendClientMessage(playeridCOLOR_GREYstring);
    }
    if(
GetPlayerVehicleID(playerid) != 0)
    {
        
DisablePlayerCheckpoint(playerid);
        
SetPlayerCheckpoint(playerid2505.8506, -2629.014413.29445);
        
SendClientMessage(playeridCOLOR_LIGHTBLUE"Deliver car to the Los Santos Docks!");
        
dropping[playerid] = true;
    }
    return 
1;

PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
        if(
dropping[playerid] == true)
        {
            
DisablePlayerCheckpoint(playerid);
            new 
vehicleid GetPlayerVehicleID(playerid);
            new 
string[128], playerbamount;
            
amount random (100);
            
format(stringsizeof(string), "*You've earned {FF6347}$%d{33CCFF} from dropping a car!"amount);
            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
            
GiveDodMoney(playerbamount);
            
SetVehicleToRespawn(vehicleid);
            
dropping[playerid] = false;
            
DropTime[playerid] = 60*20;
            
SetTimerEx("DropcarTime"1000false"i"playerid); 
Reply


Messages In This Thread
CMD Disable - by weedxd - 18.09.2014, 13:47
Re: CMD Disable - by Eth - 18.09.2014, 14:33
Re: CMD Disable - by DaniceMcHarley - 18.09.2014, 15:05
Re: CMD Disable - by weedxd - 18.09.2014, 15:20
Re: CMD Disable - by shourya12 - 18.09.2014, 15:24
Re: CMD Disable - by weedxd - 18.09.2014, 15:25
Re: CMD Disable - by shourya12 - 18.09.2014, 15:29
Re: CMD Disable - by weedxd - 18.09.2014, 15:37
Re: CMD Disable - by DaniceMcHarley - 18.09.2014, 16:00
Re: CMD Disable - by weedxd - 18.09.2014, 16:03

Forum Jump:


Users browsing this thread: 1 Guest(s)