how to?
#1

how to make this command for multiple admin ranks?

if (strcmp("/hq", cmdtext, true, 10) == 0) // Teleports Admins To Admin HQ
{
if(PlayerAdminLevel[playerid] == 1337)
{
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid,88.7433);
SetPlayerPos(playerid,2082.8745,1272.4794,10.8203) ;
SetCameraBehindPlayer(playerid);
}
else
SendClientMessage(playerid,0xFF0000AA,"Bad Command. Type /commands for available commands depending on your chosen job/skill");
return 1;
}
Reply
#2

Код:
if(PlayerAdminLevel[playerid] == 1337 || PlayerAdminLevel[playerid] == 1)
Or,

Код:
if(PlayerAdminLevel[playerid] <= 1337)
Equals or is smaller than 1337

Or,

Код:
if(PlayerAdminLevel[playerid] >= 1337)
Equals or is greater than 1337
Reply
#3

ty
Reply
#4

pawn Код:
if(PlayerAdminLevel[playerid] > 0)
I think that is what you need, this checks if the player has any admin level at all, if not he won't be able to do it.
Reply
#5

Quote:
Originally Posted by [ST
DutchBas ]
pawn Код:
if(PlayerAdminLevel[playerid] >= 0)
I think that is what you need, this checks if the player has any admin level at all, if not he won't be able to do it.
It also checks if player's admin level is equal to 0 (player isn't admin with the level 0 probably).
Reply
#6

Oh woops I didnt delete the =... *blushes*
Edited it :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)