14.08.2012, 00:07
^ Then you can use if statements or switches to determine whether they are or are not in a faction.
Like so:
Like so:
pawn Код:
if(PlayerInfo[playerid][pFaction] == 1 && PlayerInfo[playerid][pRank] == 6) //Lets say faction 1 is LSPD and they are leader (rank 6)
{
//What happens if they are in the LSPD
}
else return SendClientMessage(playerid, -1, "You are not in that faction!");
//Or
switch(PlayerInfo[playerid][pFaction])
{
case 1: //LSPD
{
//Do something here if they are LSPD
}
case 2: //Faction 2
{
//Do something here if they are in faction 2
}
}