SA-MP Forums Archive
Check from a enum - 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: Check from a enum (/showthread.php?tid=398236)



Check from a enum - Lz - 08.12.2012

pawn Код:
enum pBPCD
{
    Recruit[28],
    Officer[28],
    Deputy[28],
    Sheriff[28]
}
new PlayerFaction[MAX_PLAYERS][pBPCD];
I want to check if the player is a sheriff, Would i do

If(PlayerFaction[playerid][pBPCD][Sheriff]
return 1;


Re: Check from a enum - NewerthRoleplay - 08.12.2012

pawn Код:
PlayerFaction[playerid][Sheriff]
You do not need the [pBPCD]


Re: Check from a enum - Lz - 08.12.2012

Quote:
Originally Posted by NewerthRoleplay
Посмотреть сообщение
pawn Код:
PlayerFaction[playerid][Sheriff]
You do not need the [pBPCD]
So for example, On my OnPlayerConnect function i could add

pawn Код:
If(PlayerFaction[playerid][Sheriff]
SendClientMessage(playerid,-1,"You are logged in as a Sheriff");
return 1;
And that it will send it to them if they are a sheriff? Which i will add to the loaduser data etc