03.11.2016, 08:29
Ok i made a very simple and quick faction system but i have a problem i want to restrict others from using the skin... Example its a police skin but i want when someone trying to spawn with that skin it will tell them they cant use it.... Im using case but if statement and case dont seems to work with each other is there any other way i can do this....
PHP код:
//setplayerteamfromclass
case 4 .. 9:
{
gTeam[playerid] = GROVES;
cS_Show(playerid);
cS_Update(playerid, 0x4682B4FF, "~g~Grove Family", "~g~]~w~ The Grove members are to protect there turfs. ~s~~n~~g~]~w~ Kill there enemies.");
SetPlayerPos(playerid,2500.6060,-1672.1453,13.3512);
SetPlayerCameraPos(playerid,2507.0615,-1674.3574,13.3732);
SetPlayerCameraLookAt(playerid,2500.6060,-1672.1453,13.3512);
SetPlayerFacingAngle(playerid,252.4717);
ApplyAnimation(playerid, "PED", "FUCKU", 4.0, 1, 0, 0, 0, 0);
}
// now this is what i use to check if player is in the faction if not it should send them this message.. but is sends the message and stills spawns them
if(gTeam[playerid] == POLICE)
{
if(pInfo[playerid][Faction] != 1)
{
SendClientMessage(playerid, red, "You are not a member of this faction");
}
}