[Solved] OnRconCommand help needed..
#1

Why this doesn't work?
pawn Код:
public OnRconCommand(cmd[])
{
    if(strcmp(cmd,"gmx",true)==0)
    {
      print("RCON command gmx has been used. Player stats saved.");
     
    }
  return 1;
}
When I type gmx into console... it doesn't print text...

EDIT:
Isn't this bug fixed yet:
Quote:
a_samp.inc

OnRconCommand - Only works in filterscripts
Reply
#2

gmx already exists without making a custom command.
Reply
#3

Quote:
Originally Posted by MenaceX^
gmx already exists without making a custom command.
I thought that public OnRconCommand(cmd[]) is for existing RCON commands....

Quote:
OnRconCommand
This callback is called when a player types things into the RCON console.
So it's for existing and custom rcon commands, isn't it?

I still need help with this.. reply... I say REPLY to me!
Reply
#4

Here is what I want to do:
When admin uses /rcon gmx, I want to save player stats cause if they aren't saved, player spawns with 0 health on restart...
Reply
#5

then OnGameModeExit you script it to save.
Reply
#6

Ok, I'll try... I didn't thought about that..
EDIT:
But I have to do function like this: SaveStats(playerid);
But public OnGameModeInit() doesn't have playerid...
EDIT2: I know.. I'll make my own command which will save stats and SendRconCommand(gmx)
Reply


Forum Jump:


Users browsing this thread: