[Help] Clan Protection
#1

I am trying to check if the player belongs to those specific clans before they try to spawn, but i don't know how to do it.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
  switch(classid)
  {
    case 0:
    {
        if(pInfo[playerid][Clan] == 2 %% pClan[playerid] = Clan_[The])
        {
        pClan[playerid] = Clan_GwE_;
        GameTextForPlayer(playerid, "~w~Gang War Elites", 5000, 5);
        SetPlayerColor(playerid, 0xFFFFFFAA);
        SetPlayerPos(playerid, 1178.1340,-2037.0829,69.0078);
        SetPlayerFacingAngle(playerid, 270.7948);
        SetPlayerCameraPos(playerid, 1183.0140,-2036.8029,69.0078);
        SetPlayerCameraLookAt(playerid, 1178.1340,-2037.0829,69.0078);
        SetPlayerTeam(playerid, Clan_GwE_);
        }
    }
    case 1:
    {
        if(pInfo[playerid][Clan] == 1 %% pClan[playerid] = Clan_GwE_)
        {
        pClan[playerid] = Clan_[The];
        GameTextForPlayer(playerid, "~h~~b~The Hostile Executors", 5000, 5);
        SetPlayerPos(playerid, 726.6046,-1276.0897,13.6484);
        SetPlayerFacingAngle(playerid, 272.7345);
        SetPlayerCameraPos(playerid, 732.4363,-1276.2006,13.5664);
        SetPlayerCameraLookAt(playerid, 726.6046,-1276.0897,13.6484);
        SetPlayerColor(playerid, 0x6495EDAA);
        SetPlayerTeam(playerid, Clan_[The]);
        }
    }
}
  return 1;
}
Its not working, and i got clueless on how else to pull this off. help plz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)