Toll Booth System SPAM
#1

Hey guys.

So I am making a tollbooth system for my server but when the player gets into range it will open the gate and spam the chat and keeps taking money while they are in range. I have also made a timer but it isn't closing the gate in 5 seconds.

This is the code:
Код:
new TollBoothLV = 0;
OnPlayerUpdate
Код:
if(IsPlayerInRangeOfPoint(playerid, 5, 1626.1011,124.8513,36.3228))
		{
		    if(TollBoothPaid[playerid] == 0)
		    {
			    new string[128];
			    PlayerInfo[playerid][pCash] -= TOLL_BOOTH_FEE;
			    MoveDynamicObject(TollBoothLV, 1624.5881, 136.6429, 35.8382, 1, -0.0, -0.0, -0.0);
			    format(string, sizeof(string), "The toll booth has cost you: $%i. You have 5 seconds to get through.", TOLL_BOOTH_FEE);
			    SendClientMessage(playerid, COLOR_YELLOW, string);
			    TollBoothPaid[playerid] = 1;
			    SetTimer("tollboothlv", 5000, false);
			    return 1;
		    }
		}

forward tollboothlv(playerid);
public tollboothlv(playerid)
{
    TollBoothPaid[playerid] = 0;
    MoveDynamicObject(TollBoothLV, 1624.58130, 136.62405, 35.83821, 1, -0.0, -0.0, -0.0);
}
OnGameModeInit
Код:
TollBoothLV = CreateDynamicObject(968, 1624.58130, 136.62405, 35.83821,   0.00000, 270.00000, 167.99652);
Hopefully one of you can solve this?
Thanks
Reply


Messages In This Thread
Toll Booth System SPAM - by Blademaster680 - 07.01.2014, 13:05
Re: Toll Booth System SPAM - by offon - 07.01.2014, 13:10
Re: Toll Booth System SPAM - by BlackSirrah239 - 07.01.2014, 13:14
Re: Toll Booth System SPAM - by Blademaster680 - 07.01.2014, 13:14
Re: Toll Booth System SPAM - by offon - 07.01.2014, 13:35
Re: Toll Booth System SPAM - by Blademaster680 - 07.01.2014, 13:43

Forum Jump:


Users browsing this thread: 1 Guest(s)