SA-MP Forums Archive
trying to make a command work for admin - 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: trying to make a command work for admin (/showthread.php?tid=308375)



trying to make a command work for admin - Riddy - 03.01.2012

pawn Код:
if (PlayerInfo[playerid][pTesters] < 1) && else if(PlayerInfo[playerid][pAdmin] < 2)) {
I am trying to make a command work for admins and testers, the code above is what am trying to do, but, i get these error

C:\Users\Rehab1\Documents\CCRP\gamemodes\cc-rp.pwn(2955 : error 029: invalid expression, assumed zero
C:\Users\Rehab1\Documents\CCRP\gamemodes\cc-rp.pwn(2955 : warning 215: expression has no effect
C:\Users\Rehab1\Documents\CCRP\gamemodes\cc-rp.pwn(2955 : error 001: expected token: ";", but found "else"
C:\Users\Rehab1\Documents\CCRP\gamemodes\cc-rp.pwn(2955 : error 029: invalid expression, assumed zero
C:\Users\Rehab1\Documents\CCRP\gamemodes\cc-rp.pwn(2955 : fatal error 107: too many error messages on one line


Re: trying to make a command work for admin - sabretur - 03.01.2012

You can't use && between ifs.


Re: trying to make a command work for admin - Konstantinos - 03.01.2012

pawn Код:
if((PlayerInfo[playerid][pTesters] < 1) || (PlayerInfo[playerid][pTesters] < 1 && PlayerInfo[playerid][pAdmin] < 2)) {
    // Code