SA-MP Forums Archive
help with the /rcon cmd - 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)
+--- Thread: help with the /rcon cmd (/showthread.php?tid=483379)



help with the /rcon cmd - Battlezone - 25.12.2013

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 ?


Re: help with the /rcon cmd - doreto - 25.12.2013

You can't disable any /rcon command , but you can use OnRconCommand to make your own rcon commands


Re: help with the /rcon cmd - Raisingz - 25.12.2013

Try this:

Quote:

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
}




Re: help with the /rcon cmd - Battlezone - 25.12.2013

Quote:
Originally Posted by doreto
Посмотреть сообщение
You can't disable any /rcon command , but you can use OnRconCommand to make your own rcon commands
okey, so i see that it's impossible :/
Thanks anyway.
EDIT:
Quote:
Originally Posted by Raisingz
Посмотреть сообщение
Try this:
nice idea ill try


Re: help with the /rcon cmd - Battlezone - 25.12.2013

Didnt work |¤_¤|


Re: help with the /rcon cmd - Raisingz - 25.12.2013

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
Quote:

rcon 0

In the server.cfg, try working with that


Re: help with the /rcon cmd - Battlezone - 25.12.2013

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?


Re: help with the /rcon cmd - Konstantinos - 25.12.2013

Quote:
Originally Posted by Raisingz
Посмотреть сообщение
Edit: You can disable rcon commands with

In the server.cfg, try working with that
Quote:
Originally Posted by SA-MP Wiki
rcon 0/1 If 0 is specified the rcon Remote Console feature is disabled.
It doesn't disable the rcon commands.


Re: help with the /rcon cmd - Raisingz - 25.12.2013

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
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 ^^