SA-MP Forums Archive
/makeadmin problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /makeadmin problem (/showthread.php?tid=519166)



/makeadmin problem - DemME - 13.06.2014

Problem with return that shows when trying to make myself admin in-game.
PHP код:
if(PlayerInfo[playerid][pAdmin] >= || IsPlayerAdmin(playerid)) 
return 
SendErrorMessage(playerid"ERROR: You are not able to access this command"); 
I wanna make the command to be able to make myself admin when even I'm logged in as RCON.
but I did it,everything fine in the gamemode success to compile but in-game it shows the error message I've put in the return string.

+rep for helpers


Re: /makeadmin problem - xGamerFx - 13.06.2014

pawn Код:
if (PlayerInfo[playerid][pAdmin] < 6 && !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, -1, "ERROR: You are not able to access this command");
try this


Re: /makeadmin problem - ]Rafaellos[ - 13.06.2014

pawn Код:
if(PlayerInfo[playerid][pAdmin] >= 6 || !IsPlayerAdmin(playerid))
Edit: late.


Re: /makeadmin problem - Stinged - 13.06.2014

It should be
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 6 || !IsPlayerAdmin(playerid))
    return SendErrorMessage(playerid, "ERROR: You are not able to access this command.");
EDIT: Late.. You should read this https://sampwiki.blast.hk/wiki/Control_Structures#Operators


Re: /makeadmin problem - Threshold - 13.06.2014

All wrong, lol.

pawn Код:
if(PlayerInfo[playerid][pAdmin] < 6 && !IsPlayerAdmin(playerid))
    return SendErrorMessage(playerid, "ERROR: You are not able to access this command.");



Re: /makeadmin problem - nmader - 13.06.2014

Made a false statement - Deleted.


Re: /makeadmin problem - AroseKhanNiazi - 13.06.2014

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
All wrong, lol.

pawn Код:
if(PlayerInfo[playerid][pAdmin] < 6 && !IsPlayerAdmin(playerid))
    return SendErrorMessage(playerid, "ERROR: You are not able to access this command.");
lol he means a command that should also work with rcon and the normal too so it should be
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 6 || !IsPlayerAdmin(playerid)) return SendErrorMessage(playerid, "ERROR: You are not able to access this command.");



Re: /makeadmin problem - xGamerFx - 13.06.2014

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
All wrong, lol.

pawn Код:
if(PlayerInfo[playerid][pAdmin] < 6 && !IsPlayerAdmin(playerid))
    return SendErrorMessage(playerid, "ERROR: You are not able to access this command.");
yes, haha, i do && but i see many ppl use || so i edit it to it || because i think i wrong, lol


Re: /makeadmin problem - arlindi - 13.06.2014

PHP код:
if(PlayerInfo[playerid][pAdmin] < && !IsPlayerAdmin(playerid))
    return 
SendErrorMessage(playerid"ERROR: You are not able to access this command."); 
This is