SendRconCommand
#1

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;
  }
Reply
#2

Server doesn't know who sent the RCON-login command, so it can't work.
Reply
#3

thanks, how would i go about setting who sent it? (that could be useful info on the wiki)
Reply
#4

You can't.
Reply
#5

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?
Reply
#6

It supports all, but "login" command won't work because you can't pass a playerid parameter.
Reply
#7

right, i have edited the wiki to say that then!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)