25.09.2011, 16:44
I'm trying to create something that blocks people from using team-based skin ids. The issue I have is that it works from team 1 to 5 but when I join team 6 with the skin I'm tring to block it allows me in anyway!
Thanks
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(PlayerInfo[playerid][pTeam] != 1)
{
if(GetPlayerSkin(playerid) == 105 || GetPlayerSkin(playerid) == 106 || GetPlayerSkin(playerid) == 107 || GetPlayerSkin(playerid) == 195)
{
SendClientMessage(playerid, COLOR_WHITE, "You are not allowed to use this skin. (Team-Skin)");
return 0;
}
}
if(PlayerInfo[playerid][pTeam] != 2)
{
if(GetPlayerSkin(playerid) == 102 || GetPlayerSkin(playerid) == 103 || GetPlayerSkin(playerid) == 104)
{
SendClientMessage(playerid, COLOR_WHITE, "You are not allowed to use this skin. (Team-Skin)");
return 0;
}
}
if(PlayerInfo[playerid][pTeam] != 3)
{
if(GetPlayerSkin(playerid) == 114 || GetPlayerSkin(playerid) == 115 || GetPlayerSkin(playerid) == 116 || GetPlayerSkin(playerid) == 41)
{
SendClientMessage(playerid, COLOR_WHITE, "You are not allowed to use this skin. (Team-Skin)");
return 0;
}
}
if(PlayerInfo[playerid][pTeam] != 4)
{
if(GetPlayerSkin(playerid) == 108 || GetPlayerSkin(playerid) == 109 || GetPlayerSkin(playerid) == 110)
{
SendClientMessage(playerid, COLOR_WHITE, "You are not allowed to use this skin. (Team-Skin)");
return 0;
}
}
if(PlayerInfo[playerid][pTeam] != 5)
{
if(GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 284 || GetPlayerSkin(playerid) == 93 || GetPlayerSkin(playerid) == 285)
{
SendClientMessage(playerid, COLOR_WHITE, "You are not allowed to use this skin. (Team-Skin)");
return 0;
}
}
if(PlayerInfo[playerid][pTeam] != 6)
{
if(GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 284 || GetPlayerSkin(playerid) == 93 || GetPlayerSkin(playerid) == 285)
{
SendClientMessage(playerid, COLOR_WHITE, "You are not allowed to use this skin. (Team-Skin)");
return 0;
}
}
return 1;
}