13.02.2013, 18:44
@ Topic poster:
This is the best way without using zcmd or other shit.
NOTE: /Rcon is not need to be used in the cmd string because the cmd is used by adding first /RCON [cmd name] in game e.g. if you want to make a rcon cmd, just under public OnRconCommand(cmd[]), add
& when you test in in-game, login as RCON admin then type /rcon [[cmd which you made name here]]
then the cmd will work.
for more help, please view: https://sampwiki.blast.hk/wiki/OnRconCommand
================================================== ======
This is the best way without using zcmd or other shit.
pawn Код:
public OnRconCommand(cmd[])
{
if(!strcmp(cmd,"Hello",true))
{
SendClientMessageToAll(0xFFFFFFAA,"SERVER: Hello Players!");
print("You said 'Hello players'.");
return 1;
}
return 0;
}
pawn Код:
if(!strcmp(cmd,"MY COMMAND NAME HERE",true))
{
// code here.
return 1;
}
then the cmd will work.
for more help, please view: https://sampwiki.blast.hk/wiki/OnRconCommand
================================================== ======