Commands in samp-server.exe console
#1

I know its possible to have commands in the samp-server.exe console, and i also tried to make one but it didnt work.
pawn Код:
public OnRconCommand(cmd[])
{
    if( !strcmp( cmd, "kickall", true ) )
    {
        print("kickall");
        foreach(Player, i)
        {
            Kick( i );
        }
    }
    return 0;
}
When i typed "kickall" in the console (with '/rcon' before it, and with 'rcon' before it and without '(/)rcon' ) nothing happened, it didnt even print 'kickall'
What can the problem be?

~Wesley
Reply
#2

I think only native rcon commands work in the console.
Reply
#3

pawn Код:
return 1;
Reply
#4

Quote:
Originally Posted by Backwardsman97
Посмотреть сообщение
I think only native rcon commands work in the console.
So actually this callback has no use then?

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
pawn Код:
return 1;
Still nothing
Reply
#5

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
So actually this callback has no use then?


Still nothing
Have you read this? https://sampwiki.blast.hk/wiki/OnRconCommand
Reply
#6

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
Yes i did
Reply
#7

When you execute a command in the console, it shouldn't be preceded by 'rcon'.
Reply
#8

Quote:
Originally Posted by [MWR]Blood
Посмотреть сообщение
When you execute a command in the console, it shouldn't be preceded by 'rcon'.
Quote:
Originally Posted by Wesley221
Посмотреть сообщение
I know its possible to have commands in the samp-server.exe console, and i also tried to make one but it didnt work.
pawn Код:
public OnRconCommand(cmd[])
{
    if( !strcmp( cmd, "kickall", true ) )
    {
        print("kickall");
        foreach(Player, i)
        {
            Kick( i );
        }
    }
    return 0;
}
When i typed "kickall" in the console (with '/rcon' before it, and with 'rcon' before it and without '(/)rcon' ) nothing happened, it didnt even print 'kickall'
What can the problem be?

~Wesley
I did it with, and without
Reply
#9

Did you try /kickall ? (Not IG)
Reply
#10

Quote:
Originally Posted by G4M3Ov3r
Посмотреть сообщение
Did you try /kickall ?
In the console you dont need the '/' before a command

Edit:
Quote:
Originally Posted by [MWR]Blood
Посмотреть сообщение
Have you tried the example code from the wiki to see if at least it works?
https://sampwiki.blast.hk/wiki/OnRconCommand
I just tried, but didnt work neither
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)