commands help
#1

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?
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)