07.05.2013, 18:07
Alright so I've found a problem, I want to show player only some skins. Take a look at the code.
So as I said there, if they are team less show only the upper code, if they are not, show the bottom code.
Now my problem is that no matter if you have team or not, it will show all skins
This is under OnGameModeInit
pawn Код:
if(PlayerInfo[playerid][pTeam] <= 1) // IT SHOULD SHOW ONLY THESE SKINS WHEN PLAYER IS pTeam 0
{
switch (classid)
{
case 0 .. 10:
{
gTeam[playerid] = POLICE;
GameTextForPlayer(playerid, "~b~Police~b~", 1000, 5);
}
case 11 .. 13:
{
gTeam[playerid] = LATIN_KINGS;
GameTextForPlayer(playerid, "~y~Latin Kings~y~", 1000, 5);
}
case 14 .. 16:
{
gTeam[playerid] = BALAS;
GameTextForPlayer(playerid, "~p~Balas", 1000, 5);
}
}
}
else if(PlayerInfo[playerid][pTeam] == 1)
{
switch (classid)
{
case 17 .. 20: // IT SHOULD SHOW ONLY THESE SKINS WHEN PLAYER IS pTeam 1
{
GameTextForPlayer(playerid, "~b~My Team", 1000, 5);
gTeam[playerid] = MY_TEAM;
}
}
}
return 1;
}
So as I said there, if they are team less show only the upper code, if they are not, show the bottom code.
Now my problem is that no matter if you have team or not, it will show all skins
This is under OnGameModeInit
pawn Код:
//THESE SKINS SHOULD BE SHOWN ONLY IF THE PLAYER DOESNT HAVE A TEAM
AddPlayerClass(265, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0); // 1
AddPlayerClass(266, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0); // 2
AddPlayerClass(267, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(280, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(281, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(282, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(283, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(284, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(285, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(286, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(288, 2267.6841,2449.1069,3.5313, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(108, 2507.3748,1242.6487,10.8203, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(109, 2507.3748,1242.6487,10.8203, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(110, 2507.3748,1242.6487,10.8203, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(102, 2625.9739,2018.8618,10.8203, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(103, 2625.9739,2018.8618,10.8203, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(104, 2625.9739,2018.8618,10.8203, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(1, 0,0,0, 269.1425, 0, 0, 0, 0, 0, 0); // 1
//THESE SKINS WILL BE SHOWN WHEN THE PLAYER DOES HAVE THE TEAM
AddPlayerClass(4, 0,0,0, 269.1425, 0, 0, 0, 0, 0, 0); // 1
AddPlayerClass(5, 0,0,0, 269.1425, 0, 0, 0, 0, 0, 0); // 1
AddPlayerClass(6, 0,0,0, 269.1425, 0, 0, 0, 0, 0, 0); // 1