Team permission help
#1

Hi everyone, I'm trying to make permission for teams like cops etc. I'm stucked at here.

Quote:
Код:
public OnPlayerRequestSpawn(playerid)
{
new Team;
Team = GetPlayerSkin(playerid);
if(Skin == 280) 
{
if(SkinPermission[playerid] == false)
{
GameTextForPlayer(playerid,"~w~You don't have ~r~permission!",3000,5);
return 0;
}
}
return 1;
}
How can I add the codes above ^ to this callback v ? I'm stucked..

Quote:
Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == ARMY && GetPlayerScore(playerid) <= 199)
	{
	    SendClientMessage(playerid,red,"You do not have permission to use this class. You must gain 200 score and above before using this class!");
		return 0;
	}
    if(gTeam[playerid] == FBI && GetPlayerScore(playerid) <= 149)
	{
	    SendClientMessage(playerid,red,"You do not have permission to use this class. You must gain 150 score and above before using this class!");
		return 0;
	}
    if(gTeam[playerid] == SWAT && GetPlayerScore(playerid) <= 99)
	{
	    SendClientMessage(playerid,red,"You do not have permission to use this class. You must gain 100 score and above before using this class!");
		return 0;
	}
    if(gTeam[playerid] == Medic && GetPlayerScore(playerid) <= 15)
	{
	    SendClientMessage(playerid,red,"You do not have permission to use this class. You must gain 15 score and above before using this class!");
		return 0;
	}
	if(IsPlayerLogged[playerid] == 0)
	{
	    SendClientMessage(playerid, ERROR, "You need to login before the spawn. Type /login [password]!");
	    return false;
	}
	else if(IsPlayerLogged[playerid] == 1)
	{
	    if(GetPlayerSkin(playerid) >= 280 && GetPlayerSkin(playerid) <= 288 || GetPlayerSkin(playerid) >= 274 && GetPlayerSkin(playerid) <= 276)
	    {
	        if(GetPlayerWantedLevel(playerid) > 0)
	        {
	            SendClientMessage(playerid, ERROR, "You left the server wanted, please spawn as a civilian to continue your current life.");
	            return false;
	        }
			else if(GetPlayerWantedLevel(playerid) == 0) return true;
	    }
		else return true;
	 }
	 return true;
}
pls help ok thnx
Reply


Messages In This Thread
Team permission help - by Uberanwar - 15.08.2013, 16:26
Re: Team permission help - by DrLozer - 15.08.2013, 20:46
Re: Team permission help - by Uberanwar - 16.08.2013, 01:35
Re: Team permission help - by PrinceKumar - 16.08.2013, 02:54

Forum Jump:


Users browsing this thread: 2 Guest(s)