[HELP] What's wrong with this? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] What's wrong with this? (
/showthread.php?tid=285826)
[HELP] What's wrong with this? -
ChaosLad - 25.09.2011
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!
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;
}
Thanks
Re: [HELP] What's wrong with this? -
aRoach - 25.09.2011
pawn Код:
public OnPlayerSpawn(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)");
ForceClassSelection( playerid );
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)");
ForceClassSelection( playerid );
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)");
ForceClassSelection( playerid );
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)");
ForceClassSelection( playerid );
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)");
ForceClassSelection( playerid );
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)");
ForceClassSelection( playerid );
return 0;
}
}
return 1;
}
Re: [HELP] What's wrong with this? -
ChaosLad - 25.09.2011
Sorry aRoach but this didn't do anything. It just spawned me and sent me the message and I can still use the team skins.
Re: [HELP] What's wrong with this? -
ChaosLad - 26.09.2011
Bump!