rcon commands aren't working
#1

It does nothing, what's wrong?
PHP код:
public OnRconCommand(cmd[])
{
    if(
strcmp(cmd"test"true) == 0)
    {
        
printf("[RCON]: You typed '/rcon %s'! and it works!"cmd);
        return 
1;
    }
     if(!
strcmp(cmd"hello"true))
    {
        
SendClientMessageToAll(0xFFFFFFAA"Hello World!");
        print(
"You said hello to the world."); // This will appear to the player who typed the rcon command in the chat in white
        
return 1;
    }
    return 
0;

Reply
#2

https://sampwiki.blast.hk/wiki/OnRconCommand

''You will need to include this callback in a loaded filterscript for it to work in the gamemode!''
Reply
#3

Код:
 print("You said hello to the world."); // This will appear to the player who typed the rcon command in the chat in white
No it wont it just echoes in the console.
Also from wiki
Quote:

You will need to include this callback in a loaded filterscript for it to work in the gamemode!

Reply
#4

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
No it wont it just echoes in the console.
You missed the last note:
Quote:

If you use the "print" function here, it will send a message to the player who typed the command in-game as well as the log.

Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You missed the last note:
Oops i was going to edit my post after reading that ...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)