Adminskin show only to admins
#1

hey,
after i login an request the class i will choose and see all skins if i have admin >= 1.
But if i have admin == 0 i will show only the classid == 4 to classid == 12 and not classid == 0 classid == 3

Now, if iґm admin >1 it work perketly.
But if iґm == 0 (that the normal player) it shows me the first 4 slots "classid == 0 to classid == 3" with an emty.
I can chosse the slots (without skin, like if there is no skin) and spawn with the admin skin but i dont see the skins.
If is klick 4 skins to right its shows me the skin classid == 4 and if i klick 1 skin to left it show me the skin of classid == 12.
But there are the empty slots... -.-

It must dont show the slots and skins to the admin == 0 player. What is false here?

hope for help

Код:
public OnPlayerRequestClass(playerid, classid)
{
	new string[128];
	
//==============================================================================
//Team 0 Admin
//==============================================================================
	if(SpielerInfo[playerid][pAdmin] >= 1)
	{
	 	if(classid == 0 || classid == 1 || classid == 2 || classid == 3)
		{
			SetPlayerPos(playerid, 1181.0011,-2036.8966,69.0078);
			SetPlayerFacingAngle(playerid, 270.7485);
			SetPlayerCameraPos(playerid, 1188.0011,-2035.8966,68.8078);
			SetPlayerCameraLookAt(playerid, 1181.0011,-2036.8966,69.0078);
			format(string, sizeof(string), "~g~%s", TEAM_0);
			GameTextForPlayer(playerid, string, 3000, 3);
			SetPlayerTeamFromClass(playerid, classid);
		}

		else if(classid == 4 || classid == 5 || classid == 6)
		{
			SetPlayerPos(playerid, 1380.6447,-1753.0427,13.5469);
			SetPlayerFacingAngle(playerid, 269.6420);
			SetPlayerCameraPos(playerid, 1387.2906,-1752.8887,13.3828);
			SetPlayerCameraLookAt(playerid, 1380.6447,-1753.0427,13.5469);
			format(string, sizeof(string), "~g~%s", TEAM_1);
			GameTextForPlayer(playerid, string, 3000, 3);
			SetPlayerTeamFromClass(playerid, classid);
		}
		
		else if(classid == 7 || classid == 8 || classid == 9)
		{
			SetPlayerPos(playerid, 2531.6277,-1667.5204,15.1688);
			SetPlayerFacingAngle(playerid, 90.1685);
			SetPlayerCameraPos(playerid, 2528.0669,-1667.4807,15.1687);
			SetPlayerCameraLookAt(playerid, 2531.6277,-1667.5204,15.1688);
			SetPlayerTeamFromClass(playerid, classid);
			format(string, sizeof(string), "~g~%s", TEAM_2);
			GameTextForPlayer(playerid, string, 3000, 3);
		}
		
		else if(classid == 10 || classid == 11 || classid == 12)
		{
			SetPlayerPos(playerid, 2158.1558,-1611.5211,14.3512);
			SetPlayerFacingAngle(playerid, 159.7673);
			SetPlayerCameraPos(playerid, 2156.4880,-1616.0403,14.0547);
			SetPlayerCameraLookAt(playerid, 2158.1558,-1611.5211,14.3512);
			SetPlayerTeamFromClass(playerid, classid);
			format(string, sizeof(string), "~g~%s", TEAM_3);
			GameTextForPlayer(playerid, string, 3000, 3);
		}
		return 1;
	}
//==============================================================================
//Team 1 Vagos
//==============================================================================
 if(SpielerInfo[playerid][pAdmin] == 0)
	{
		if(classid == 4 || classid == 5 || classid == 6)
		{
			SetPlayerPos(playerid, 1380.6447,-1753.0427,13.5469);
			SetPlayerFacingAngle(playerid, 269.6420);
			SetPlayerCameraPos(playerid, 1387.2906,-1752.8887,13.3828);
			SetPlayerCameraLookAt(playerid, 1380.6447,-1753.0427,13.5469);
			format(string, sizeof(string), "~g~%s", TEAM_1);
			GameTextForPlayer(playerid, string, 3000, 3);
			SetPlayerTeamFromClass(playerid, classid);
		}
//==============================================================================
//Team 2 Grove Street
//==============================================================================
		else if(classid == 7 || classid == 8 || classid == 9)
		{
			SetPlayerPos(playerid, 2531.6277,-1667.5204,15.1688);
			SetPlayerFacingAngle(playerid, 90.1685);
			SetPlayerCameraPos(playerid, 2528.0669,-1667.4807,15.1687);
			SetPlayerCameraLookAt(playerid, 2531.6277,-1667.5204,15.1688);
			SetPlayerTeamFromClass(playerid, classid);
			format(string, sizeof(string), "~g~%s", TEAM_2);
			GameTextForPlayer(playerid, string, 3000, 3);
		}
//==============================================================================
//Team 3 Ballas
//==============================================================================
		else if(classid == 10 || classid == 11 || classid == 12)
		{
			SetPlayerPos(playerid, 2158.1558,-1611.5211,14.3512);
			SetPlayerFacingAngle(playerid, 159.7673);
			SetPlayerCameraPos(playerid, 2156.4880,-1616.0403,14.0547);
			SetPlayerCameraLookAt(playerid, 2158.1558,-1611.5211,14.3512);
			SetPlayerTeamFromClass(playerid, classid);
			format(string, sizeof(string), "~g~%s", TEAM_3);
			GameTextForPlayer(playerid, string, 3000, 3);
		}
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)