SA-MP Forums Archive
Help about message - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help about message (/showthread.php?tid=435221)



Help about message - Zumba - 06.05.2013

I put this on OnPlayerUpdate for jetpack cheats
Код:
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) //will check if player is using Jetpack
    {
        if(JetPack[playerid] == 0) //if global variable JetPack is 0
        {
                new string[128],name[MAX_PLAYER_NAME];
                GetPlayerName(playerid,name,sizeof(name));
                format(string,sizeof(string),"LG: %s mozebi koristi Jetpack Hack proverete go.",name);
                SendClientMessageToAll(COLOR_GREEN,string);
        }
        else //if global variable JetPack is 1
        return 1; //will return 1;
    }
    else JetPack[playerid] = 0; //if player leaves the JetPack using Enter/F it will set the Global Variable JetPack to 0 again to avoid the problem in our command /jetpack
How to make to send message just one time not every second ??