Posts: 3,004
Threads: 12
Joined: May 2011
23.12.2014, 11:33
(
Последний раз редактировалось Kaperstone; 23.12.2014 в 12:57.
)
Quote:
Originally Posted by UltraScripter
pawn Код:
if(PlayerInfo[playerid][pRank] => 2) if(PlayerInfo[playerid][pRank] =< 8) {
}
|
This is not how you add checks
pawn Код:
if(PlayerInfo[playerid][pRank] => 2 && PlayerInfo[playerid][pRank] =< 8) {}
To have two or more checks you just need to add the conditional statement inside the brackets () and seperate each with OR or AND gates.
AND gate is &&
OR gate is ||
Quote:
Originally Posted by astanalol
this line 1306 and 1307
PHP код:
} else SendClientMessage(playerid, -1, "Sorry , you are not admin");
return 1;
all cmd
PHP код:
CMD:setrank(playerid, params[])
{
new str[128], ARank, lookupid;
if(PlayerInfo[playerid][pRank] >= 2 && PlayerInfo[playerid][pRank] <= 8)
{
if(sscanf(params, "ui", lookupid, ARank)) return SendClientMessage(playerid, -1, "Usage: /setrank <PlayerID/PlayerName> <Rank>");
format(str, sizeof(str), "Admin %s (ID:%d) has setted %s (ID:%d) Rank to (%d)",GetName(playerid), playerid, GetName(lookupid), lookupid, ARank);
SendClientMessageToAll(-1, str);
PlayerInfo[lookupid][pRank] = ARank;
}
} else SendClientMessage(playerid, -1, "Sorry , you are not admin");
return 1;
}
|
You have extra closing bracket }