SA-MP Forums Archive
commands help - 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: commands help (/showthread.php?tid=630165)



commands help - silverms - 10.03.2017

hello so I have this onplayercommandrecived
it is good
but
PHP код:
    format(cstringsizeof(cstring), "[cmd] [%s]: %s"playeridscmdtext);
    for(new 
i=0i<PLAYERSi++)
    {
        if(
adlvl[i] >= && Listen(i) == 1)
        {
            if(
adlvl[playerid] <= adlvl[i])
            {
                if(
!= playeridSendClientMessage(i, -1cstring);
            }
        }
    } 
how can I make it that if he typed a specific command it doenst send the command to the admins?


Re: commands help - Toroi - 10.03.2017

You could use strcmp and a simple return for that.

https://sampwiki.blast.hk/wiki/Strcmp
https://sampwiki.blast.hk/wiki/Control_Structures#return

However, why the hell would someone want to know every command the players type? Is not it better to just print it in the server console and check the server log later if you need a proof or something?

It's your gamemode though, you can do as you like.