Difference between CommandText and RCON Command
#1

what's the difference between:
pawn Код:
public OnPlayerCommandText
and

pawn Код:
public OnRCONCommand
is the RCONCommand is for admins only ? why to use !IsPlayerAdmin(playerid) on OnPlayerCommandText then ?
Reply
#2

"This callback is called when a command is sent through the server console, remote RCON, or via the in-game /rcon command."
Reply
#3

That is reciving the commands through the consol
Edit: too late :/
Reply
#4

thanks but explain more please
Reply
#5

OnRconCommand is almost the same as OnPlayerCommandText, the only differences are:
  • OnRconCommand does only be called if you are sending a rcon command (/rcon YouCommandHere, /rcon before is needed).
  • With OnRconCommand you have no ability to use the playerid param, so if you have an admin command with GetPlayerPos, SendClientMessage, etc in it, you can't use it.
Reply
#6

  • Simple is OnOrconCommand is just for rcon admin and starting with /rcon Yourcommand
  • And OnPlayerCommand is for all... and don't starting with /rcon...
Reply
#7

thanks all, so its better to only use OnPlayerCommandText
and
if(!IsPlayerAdmin(playerid));
Reply
#8

  • Yes. Because OnPlayerCommandText have a playerid... So the OnPlayerCommandText is more useful than OnRconCommand
Reply
#9

you dont know what your talking about!

OnRconCommand is there for any commands including the parameters that are send from the server console not in game!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)