[HELP] if(IsPlayerAdmin(playerid) HELP ME = REP+ -
InTeL_cOrE_i7 - 11.06.2013
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
Re: [HELP] Is player rcon admin HELP ME = REP+ -
Kwarde - 11.06.2013
public OnRconCommand(cmd[]) and
public OnRconLogginAttempt(ip[], password[], success)
Re: [HELP] Is player rcon admin HELP ME = REP+ -
InTeL_cOrE_i7 - 11.06.2013
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
Re: [HELP] Is player rcon admin HELP ME = REP+ -
InTeL_cOrE_i7 - 11.06.2013
Is anyone going to help me?...
Re: [HELP] Is player rcon admin HELP ME = REP+ -
InTeL_cOrE_i7 - 11.06.2013
Forking hell, please help me!!
Re: [HELP] Is player rcon admin HELP ME = REP+ -
Guest123 - 11.06.2013
https://sampwiki.blast.hk/wiki/OnRconCommand
Re: [HELP] Is player rcon admin HELP ME = REP+ -
Sascha - 11.06.2013
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[]"
Re: [HELP] Is player rcon admin HELP ME = REP+ -
InTeL_cOrE_i7 - 11.06.2013
Quote:
Originally Posted by Sascha
|
wow, thx a lot for all the help, learn the basics... wtf? i was trying to show you what i want to do...
Re: [HELP] Is player rcon admin HELP ME = REP+ -
Sascha - 11.06.2013
Код:
public OnRconCommand(cmd[])
{
if(IsPlayerAdmin(playerid)
Re: [HELP] Is player rcon admin HELP ME = REP+ -
Kwarde - 11.06.2013
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