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

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new Team;
Team = GetPlayerSkin(playerid);
if(Team == 280)
{
if(SkinPermission[playerid] == false)
{
GameTextForPlayer(playerid,"~w~You don't have ~r~permission!",3000,5);
return 0;
}
}
return 1;
}
Reply
#3

yeah.. o.O i mean want to combine it
Reply
#4

Don't use return 0
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)