22.05.2011, 12:57
I'm trying to make some faction skicks locked for only faction members and I'm not sure how I should script this. The script is put under OnPlayerSpawn.
Can you find any problems? Thanks for the help!
pawn Код:
if(GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 284 || GetPlayerSkin(playerid) == 265 || GetPlayerSkin(playerid) == 266 ||
GetPlayerSkin(playerid) == 285)
{
if(gTeam[playerid] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pTeam] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You are not allowed to enter this skin. (Kicked)");
Kick(playerid);
}
}
else if(GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 288 || GetPlayerSkin(playerid) == 287)
{
if(gTeam[playerid] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pTeam] == 2)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You are not allowed to enter this skin. (Kicked)");
Kick(playerid);
}
}