SA-MP Forums Archive
How to make a Rcon command? - 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: How to make a Rcon command? (/showthread.php?tid=173466)



How to make a Rcon command? - ||123|| - 02.09.2010

As the topic says, I want to make an Rcon command if that's possible like uhm...writing a rcon command on console, but im not sure if that's possible, is it?


Re: How to make a Rcon command? - DiddyBop - 02.09.2010

it is. but with your own functions.


Re: How to make a Rcon command? - Fj0rtizFredde - 02.09.2010

Something like this? https://sampwiki.blast.hk/wiki/OnRconCommand


Re: How to make a Rcon command? - ||123|| - 02.09.2010

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
No that's when you enter a pre-made rcon command. I want to make my own. And Dippy, my own functions like? Any threads about this or any info?


Re: How to make a Rcon command? - Jochemd - 02.09.2010

Quick write, if you use dcmd:

pawn Код:
dcmd_command(playerid,params[])
{
    if(IsPlayerAdmin))
    {
        // stuff here
    }
    return 1;
}



Re: How to make a Rcon command? - ||123|| - 02.09.2010

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
Quick write, if you use dcmd:

pawn Код:
dcmd_command(playerid,params[])
{
    if(IsPlayerAdmin))
    {
        // stuff here
    }
    return 1;
}
No, that's not an Rcon command, and it can't be accessed in the console.


Re: How to make a Rcon command? - Fj0rtizFredde - 02.09.2010

Quote:
Originally Posted by ||123||
Посмотреть сообщение
No that's when you enter a pre-made rcon command. I want to make my own. And Dippy, my own functions like? Any threads about this or any info?
You saied you want to create your own rcon commands?

pawn Код:
public OnRconCommand(cmd[])
{    
    if(strcmp("test", cmd, true) == 0)    
    {
        print("It works");      
    }    
    return 1;
}



Re: How to make a Rcon command? - LarzI - 02.09.2010

It is a command for RCON admins only, not a RCON command.
I dunno about nowadays, but in 0.2, you could only make RCON commands within FS's to get them to work.
It's made within OnRconCommand just like a normal command.
Example:
pawn Код:
public OnRconCommand(cmd[])
{
    if( !strcmp(cmd, "test", true ))
        return print( "test message" );
    return true;
}
EDIT: too late, blargh


Re: How to make a Rcon command? - ||123|| - 02.09.2010

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
You saied you want to create your own rcon commands?

pawn Код:
public OnRconCommand(cmd[])
{    
    if(strcmp("test", cmd, true) == 0)    
    {
        print("It works");      
    }    
    return 1;
}
Doesnt works, I tried it on Rcon console.


Re: How to make a Rcon command? - LarzI - 02.09.2010

Read my post