PDA

View Full Version : help with the /rcon cmd


Battlezone
25/12/2013, 04:02 PM
Using zcmd

CMD:rcon(playerid,params [])
{
//my code..
return 1;
}


Of course it doesnt work
I want to find a way to disable the samp /rcon original cmd and replace it by mine, is it possible ?

doreto
25/12/2013, 04:06 PM
You can't disable any /rcon command , but you can use OnRconCommand (http://wiki.sa-mp.com/wiki/OnRconCommand)to make your own rcon commands

Raisingz
25/12/2013, 04:07 PM
Try this:

public OnRconCommand(cmd[])
{
if(!strcmp(cmdtext, "", true) // if you just want to change a command, put your command inside the "", otherwise delete this if
//blablabla
return 1; // so it tells the server that your script handled this command
}

Battlezone
25/12/2013, 04:08 PM
You can't disable any /rcon command , but you can use OnRconCommand (http://wiki.sa-mp.com/wiki/OnRconCommand)to make your own rcon commands

okey, so i see that it's impossible :/
Thanks anyway.
EDIT: Try this:
nice idea ill try :D

Battlezone
25/12/2013, 04:26 PM
Didnt work |_|

Raisingz
25/12/2013, 04:29 PM
Uh, I'm scripting in JAVA instead of PAWN and I can handle the natives as I want. I have no clue why this doesn't work for you when it does for me...

Edit: You can disable rcon commands with
rcon 0
In the server.cfg, try working with that :)

Battlezone
25/12/2013, 04:36 PM
LOL I forgot about it thanks !
EDIT : Doesnt work |_|
About handling the natives, how do you exactly do it? how did it work for you?

Konstantinos
25/12/2013, 04:53 PM
Edit: You can disable rcon commands with

In the server.cfg, try working with that :)


rcon 0/1 If 0 is specified the rcon Remote Console feature is disabled.


It doesn't disable the rcon commands.

Raisingz
25/12/2013, 06:42 PM
It doesn't disable the rcon commands.

Oh misread the documentation. Well I guess there's no direct way of achieving that.
And about the way I achieve it, I'm not releasing my Java plugin any earlier so can't help you ^^