[HELP] Is player rcon admin HELP ME = REP+
#1

so what i want to do it, if player tries a rcon command, i want server to send that player a message but if that player is a rcon admin, to do nothing.

This is the code i used...
public OnRconCommand(cmd[])
{
if(IsPlayerAdmin(playerid)
{

else
SendClientMessage(playerid, 0xFFFFFFFF, "RCON: You are not a Rcon admin");
}
return 1;
}

This is the errors i get
C:\Users\Ronaldo\Desktop\Stuff\Freeroam Server\gamemodes\dm3.pwn(204) : error 017: undefined symbol "playerid"
C:\Users\Ronaldo\Desktop\Stuff\Freeroam Server\gamemodes\dm3.pwn(207) : error 029: invalid expression, assumed zero
C:\Users\Ronaldo\Desktop\Stuff\Freeroam Server\gamemodes\dm3.pwn(20 : warning 217: loose indentation
C:\Users\Ronaldo\Desktop\Stuff\Freeroam Server\gamemodes\dm3.pwn(20 : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Please help
Reply
#2

public OnRconCommand(cmd[]) and public OnRconLogginAttempt(ip[], password[], success)
Reply
#3

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
public OnRconCommand(cmd[]) and public OnRconLogginAttempt(ip[], password[], success)
i tries that..

This is the code i used...
public OnRconCommand(cmd[])
{
if(IsPlayerAdmin(playerid)
{

else
SendClientMessage(playerid, 0xFFFFFFFF, "RCON: You are not a Rcon admin");
}
return 1;
}

This is the errors i get
C:\Users\Ronaldo\Desktop\Stuff\Freeroam Server\gamemodes\dm3.pwn(204) : error 017: undefined symbol "playerid"
C:\Users\Ronaldo\Desktop\Stuff\Freeroam Server\gamemodes\dm3.pwn(207) : error 029: invalid expression, assumed zero
C:\Users\Ronaldo\Desktop\Stuff\Freeroam Server\gamemodes\dm3.pwn(20 : warning 217: loose indentation
C:\Users\Ronaldo\Desktop\Stuff\Freeroam Server\gamemodes\dm3.pwn(20 : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Please help
Reply
#4

Is anyone going to help me?...
Reply
#5

Forking hell, please help me!!
Reply
#6

https://sampwiki.blast.hk/wiki/OnRconCommand
Reply
#7

https://sampwiki.blast.hk/wiki/Scripting_Basics
https://sampwiki.blast.hk/wiki/Category:Scripting_Functions
https://sampwiki.blast.hk/wiki/Category:Scripting_Callbacks

learn the basics first... you can't use a parameter like "playerid" if the only parameter given in the callback is "cmd[]"
Reply
#8

Quote:
Originally Posted by Sascha
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/Scripting_Basics
https://sampwiki.blast.hk/wiki/Category:Scripting_Functions
https://sampwiki.blast.hk/wiki/Category:Scripting_Callbacks

learn the basics first... you can't use a parameter like "playerid" if the only parameter given in the callback is "cmd[]"
wow, thx a lot for all the help, learn the basics... wtf? i was trying to show you what i want to do...
Reply
#9

Код:
public OnRconCommand(cmd[])
{
if(IsPlayerAdmin(playerid)
Reply
#10

OnRconCommand() isn't called when a player is not a RCON command, so checking is 1- impossible (since it doesn't have the 'playerid' parameter) and 2- unnecesary

This should work:
pawn Код:
public OnRconCommand(cmd[])
{
    printf("You used the command: %s", cmd);
    return 1;
}
Please note that OnRconCommand only work in filterscripts
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)