Question about RCON.
#1

I've trying to detect when someone type in the rcon, "/rcon say BLABLA", but i OnRconComamnd no detect say, or any default rcon command, although if i'm typing "/rcon blbla" or any non-exists command, it does detect.

My question: There's a way to detect default rcon commands?
Reply
#2

Quote:

RCON Commands
Type cmdlist for commands (or, varlist for variables) making use of the RCON in-game ('/rcon cmdlist'). You do not need to type with [ ] they're just to highlight the parameter.
These are the functions that you as admin can use:
/rcon cmdlist - Shows a list with commands.
/rcon varlist - Shows a list with the current variables.
/rcon exit - Closes the server.
/rcon echo [text] - Shows the [text] in the console of the server (NOT the client-console in-game).
/rcon hostname [name] - change the hostname text (example: /rcon hostname my server).
/rcon gamemodetext [name] - change the gamemode text (example: /rcon gamemodetext my gamemode).
/rcon mapname [name] - change the map name text (example: /rcon mapname San Andreas).
/rcon exec [filename] - Executes the file which contains server cfg (example: /rcon exec blah.cfg).
/rcon kick [ID] - Kick the player with the given ID (example: /rcon kick 2).
/rcon ban [ID] - Ban the player with the given ID (example: /rcon ban 2).
/rcon changemode [mode] - This command will change the current gamemode to the given one (example: if you want to play sftdm: /rcon changemode sftdm).
/rcon gmx - Will load the next gamemode in server.cfg.
/rcon reloadbans - reloads the samp.ban where the banned IP addresses are stored. Should be used after unbanning and IP address.
/rcon reloadlog - reloads the server_log.txt. Has no noticeable effect on anything.
/rcon say - shows a message to the players in the client-console (example: /rcon say hello will show as * Admin: hello).
/rcon players - Shows the players that are in the server (with their name, IP & ping).
/rcon banip [IP] - Ban the given IP (example: /rcon banip 127.0.0.1).
/rcon unbanip [IP] - Unban the given IP (example: /rcon unbanip 127.0.0.1).
/rcon gravity - Changes the gravity (example: /rcon gravity 0.00.
/rcon weather [ID] - Changes the weather (example: /rcon weather 1).
/rcon loadfs - Loads the given filterscript (example: /rcon loadfs adminfs).
/rcon weburl [server url] - Changes the server URL in the masterlists/SA-MP client
/rcon unloadfs - Unload the given filterscript (example: /rcon unloadfs adminfs).
/rcon reloadfs - Reloads the given filterscript (example: /rcon reloadfs adminfs).
/rcon rcon_password [PASSWORD] - Change the rcon's password
/rcon password [password] - Sets/resets the server password
The below commands are only available in 0.3z R2 and above.
/rcon messageslimit [count] - Change the number of messages per second a client sends to the server. (default 500)
/rcon ackslimit [count] - Change the limit of acks (default 1000) (Since 0.3z R2-2, default limit is 3000)
/rcon messageholelimit [count] - Change the limit of message holes (Also available in 0.3z R1) (default 3000)
/rcon playertimeout [limit m/s] - Change the time in milliseconds until a player timeouts when not sending any packets. (default 1000)
The above four limits/counts are just made to avoid several tools which can attack any SA-MP server by freezing it or crashing. So, simply, just set them according to your server. The default values are default, if you see any wrong kicks, just increase the values as soon as possible so that the innocent players won't get kicked by it. More info: http://forum.sa-mp.com/showpost.php?...3&postcount=47
[edit]

Taken from ClickMe
Reply
#3

Quote:
Originally Posted by gurmani11
Посмотреть сообщение
Taken from ClickMe
But it isn't what i'm asking for.
Reply
#4

You may want to write it in console as i understood
pawn Код:
public OnPlayerText(playerid, text[])
{
    printf("Text: %s", text);
    return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    printf("CMD Used: %s",cmdtext);
    return 1;
}
Reply
#5

Quote:
Originally Posted by gurmani11
Посмотреть сообщение
You may want to write it in console as i understood
pawn Код:
public OnPlayerText(playerid, text[])
{
    printf("Text: %s", text);
    return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    printf("CMD Used: %s",cmdtext);
    return 1;
}
Man, don't post if you don't read the topic. RCON.
Reply
#6

UP..
Reply
#7

https://sampwiki.blast.hk/wiki/OnRconCommand

You might need to use an array to store the regular commands and then loop through it to see whether or not they typed a default command.
Reply
#8

Quote:
Originally Posted by Mionee
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/OnRconCommand

You might need to use an array to store the regular commands and then loop through it to see whether or not they typed a default command.
I wrote, printf(cmd); to see the result of the what i wrote, But it isn't work. The only thing i wan't is to detect OnRconCommand for "say".
Код:
if(!strcmp(cmd, "say", true)) printf("ALALALAL");
Isn't work.
Reply
#9

UPUP.
Reply
#10

pawn Код:
public OnRconCommand(cmd[])
{
    if(!strcmp(cmd, "say", true))
    {
        // bla bla bla
        return 1;
    }
    return 0;
}
I hope I helped any feedback would be appreciated!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)