15.08.2013, 16:26
Hi everyone, I'm trying to make permission for teams like cops etc. I'm stucked at here.
How can I add the codes above ^ to this callback v ? I'm stucked..
pls help ok thnx
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;
}
|
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;
}
|

