SendRconCommand - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SendRconCommand (
/showthread.php?tid=119671)
SendRconCommand -
adsy - 08.01.2010
so i have this script so that i can bypass the long rcon command on login (for testing) but i have no idea what ive done wrong.
the only example on the wiki returns the gmx sendrconcommand.
The script below is in a filterscript which is working as other bits in there call fine. What am i doing wrong?
Код:
if(strcmp(cmd, "/login", true) == 0) {
SendRconCommand("login password"); //this is not my server password ;)
return 1;
}
Re: SendRconCommand -
Correlli - 08.01.2010
Server doesn't know who sent the RCON-login command, so it can't work.
Re: SendRconCommand -
adsy - 08.01.2010
thanks, how would i go about setting who sent it? (that could be useful info on the wiki)
Re: SendRconCommand -
Correlli - 08.01.2010
You can't.
Re: SendRconCommand -
adsy - 08.01.2010
then why is the function listed so badly?
https://sampwiki.blast.hk/wiki/SendRconCommand
Quote:
This function sends a defined RCON command, which can be used to execute RCON commands without being logged in to RCON.
|
so without any explanation on the function at all how am i to know what commands it accepts and what ones it doesnt:
/rcon cmdlist
/rcon varlist
/rcon exit
/rcon echo [text]
/rcon hostname [name]
/rcon gamemodetext [name]
/rcon mapname [name]
/rcon exec [filename]
/rcon kick [ID]
/rcon ban [ID]
/rcon changemode [mode]
/rcon gmx
/rcon reloadbans
/rcon reloadlog
/rcon say
/rcon players
/rcon banip [IP]
/rcon unbanip [IP]
/rcon gravity
/rcon weather [ID]
/rcon loadfs
/rcon unloadfs
/rcon reloadfs
so which ones does it support?
Re: SendRconCommand -
Correlli - 08.01.2010
It supports all, but "login" command won't work because you can't pass a playerid parameter.
Re: SendRconCommand -
adsy - 09.01.2010
right, i have edited the wiki to say that then!