OnRconCommand with /rcon gmx? - 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: OnRconCommand with /rcon gmx? (
/showthread.php?tid=281225)
OnRconCommand with /rcon gmx? -
Tee - 04.09.2011
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;
}
Re: OnRconCommand with /rcon gmx? -
Vince - 04.09.2011
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.
Re: OnRconCommand with /rcon gmx? -
Snipa - 04.09.2011
try returning 0.
Re: OnRconCommand with /rcon gmx? -
Tee - 04.09.2011
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.
Re: OnRconCommand with /rcon gmx? -
dowster - 05.09.2011
in your OnGameModeExit do
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
OnPlayerDisconnect(i);
}
if you wanna be efficient use foreach