Help me make this work better?
#1

I have a problem with a automatic gate I created, although it works, sometimes it spams even though I created something to stop it, anyway is there a better way to make this?

pawn Код:
if(IsPlayerInRangeOfPoint(playerid,10,1549.59997559,-1630.00000000,12.60000038))
    {
        if(PlayerInfo[playerid][pFaction] == 2 && PlayerInfo[playerid][pSpam] == 0)
        {
            PlayerInfo[playerid][pSpam] = 1; // To stop spam (.. && PlayerInfo[playerid][pSpam] == 0))
            GetPlayerName(playerid, name, sizeof(name));
            format(string, sizeof(string), "%s uses their remote to open the gates.", name);
            ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            MoveObject(Gate, 1549.59997559,-1630.00000000,12.60000038, 10);
            SetTimer("LSPDGateClose",5000,1); // closes the gate after the time set
            SetTimer("SpamStop",5000,1); // Sets a timer to avoid spam
        }
    }
I cant find any way to do it, setting the time longer doesn't help either, sometimes it still spams.
Reply


Messages In This Thread
Help me make this work better? - by ryansheilds - 07.02.2012, 14:44
Re: Help me make this work better? - by Gerira Gaijin - 07.02.2012, 16:32
Re: Help me make this work better? - by ryansheilds - 07.02.2012, 16:40
Re: Help me make this work better? - by ryansheilds - 07.02.2012, 16:51

Forum Jump:


Users browsing this thread: 1 Guest(s)