How to make a Rcon command?
#1

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

it is. but with your own functions.
Reply
#3

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

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

Quick write, if you use dcmd:

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

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.
Reply
#7

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

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
Reply
#9

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.
Reply
#10

Read my post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)