Check from a enum
#1

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;
Reply
#2

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)