OnRconCommand with /rcon gmx?
#1

Is there a to stop the 'rcon gmx' command form being called? Like someone types '/rcon gmx' would OnRconCommand get called and stops that command from executing? I tried it but It did not work.

Here's what I did:
pawn Код:
public OnRconCommand(cmd[])
{
    if(strfind(cmd,"gmx",true) != -1)
    {
        SendClientMessageToAll(Grey,"Please use /gmx insead of /rcon gmx!");
        return 1;
    }
    return 0;
}
Reply
#2

As far as I know, OnRconCommand is only called for things typed into the console. Just use an admin system and don't give RCON access to your other admins.
Reply
#3

try returning 0.
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
As far as I know, OnRconCommand is only called for things typed into the console. Just use an admin system and don't give RCON access to your other admins.
No it's just me. I use '/gmx' so I can loop through all players to save POSITION because it does not save OnGameModeExit only on disconnect - It might sound weird but I have a 1 second timer that saves postion in a variable the on disconnect a huge function is called that updates more than 100 fields.
Reply
#5

in your OnGameModeExit do
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    OnPlayerDisconnect(i);
}
if you wanna be efficient use foreach
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)