TollGate SetTimerEx
#2

pawn Код:
CMD:gate2(playerid, params[])
{
    new string[128];
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 59.9662,-1525.9076,4.6624) && IsACop(playerid))
    {
        if(TollGateStatus == 0 )
        {
            TollGateStatus = 1;
            SetTimerEx("CloseGate", 6000, false); // Closing in 6 seconds.
            MoveDynamicObject(TollGate, 55.5, -1528.90002, 4.7+0.0001, 0.0001, 0, 0, 82.09);
            format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
            ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        else
        {
            TollGateStatus = 0;
            MoveDynamicObject(TollGate, 55.5, -1528.90002, 4.7+0.0001, 0.0001, 0, 90, 82.09);
            format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
            ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
    }
}

forward CloseGate();
public CloseGate()
{
    if(TollGateStatus == 1)
    {
        MoveDynamicObject(TollGate, 55.5, -1528.90002, 4.7+0.0001, 0.0001, 0, 90, 82.09);
    }
    return 1;
}
Reply


Messages In This Thread
TollGate SetTimerEx - by lider1241 - 03.09.2013, 13:58
Re: TollGate SetTimerEx - by Shadow_ - 03.09.2013, 14:59
Re: TollGate SetTimerEx - by lider1241 - 03.09.2013, 17:53

Forum Jump:


Users browsing this thread: 2 Guest(s)