What is the CMD/Function that Sends a Command to teh Rcon?
#1

What is the CMD/Function that Sends a Command to teh Rcon?
I want to set that when my script loads/GameMode
It will send a Command to the Rcon to reload a Filterscript?
Reply
#2

pawn Код:
public SendRconCommand(cmd[])
  return 1;
Reply
#3

Quote:
Originally Posted by MenaceX^
pawn Код:
public SendRconCommand(cmd[])
  return 1;
I think i need to do:
pawn Код:
forward FS();

public FS()
{
    SendRconCommand("reloadfs FS");
    return 1;
}
Reply
#4

Quote:
Originally Posted by ssǝן‾ʎ
SendRconCommand is not public and doesn't return 1 all the time, I'm not entirely sure what you're trying to show with that format.
It was just an example. And it is a public.
Reply
#5

Oh sorry I was wrong with 'OnRconCommand'
Yes Jack. You should do it like you said.

Example of a command with SendRconCommand.
pawn Код:
if(!strcmp(cmd,"/banip",true))
{
  cmd=strtok(cmdtext,idx);
  if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /banip [player's IP] get it someone's IP by /ip.");
  format(string,sizeof(string),"banip %s",cmd);
  SendRconCommand(string);
  return SendRconCommand("reloadbans");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)