25.12.2010, 17:56
Hey guys, how can i make it so that last team, gTeam 6 is only for special people that have PlayerInvite = 1 and for people who got playerinvite = 0 it wont appear?
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
new string[32];
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,-2654.4,1424.2,912.4);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,-2654.4-1.5,1424.2,912.4+0.7);
SetPlayerCameraLookAt(playerid,-2654.4,1424.2,912.4+0.7);
if (classid >= 0 && classid <= 5)
{
format(string, sizeof(string), "~g~Grove Street.");
GameTextForPlayer(playerid, string, 3000, 4);
gTeam[playerid] = 1;
}
else if (classid >= 6 && classid <= 11)
{
format(string, sizeof(string), "~p~Los Santos Ballas.");
GameTextForPlayer(playerid, string, 3000, 4);
gTeam[playerid] = 2;
}
else if (classid >= 12 && classid <= 17)
{
format(string, sizeof(string), "~b~Los Aztecas.");
GameTextForPlayer(playerid, string, 3000, 4);
gTeam[playerid] = 3;
}
else if (classid >= 18 && classid <= 23)
{
format(string, sizeof(string), "~y~Los Santos Vagos.");
GameTextForPlayer(playerid, string, 3000, 4);
gTeam[playerid] = 4;
}
else if (classid >= 24 && classid <= 26)
{
gTeam[playerid] = 5;
format(string, sizeof(string), "~r~Bikers.");
GameTextForPlayer(playerid, string, 3000, 4);
}
else if (classid >= 27 && classid <= 29)
{
gTeam[playerid] = 6;
format(string, sizeof(string), "~w~Public Services.");
GameTextForPlayer(playerid, string, 3000, 4);
}
PlayerInfo[playerid][pModel] = Skins[classid][0];
return 1;
}