08.01.2016, 09:25
look at picture.When I choose my team.It happens on team:.
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
new pinfo3[128];
SetPlayerPos(playerid, 220.3261,1822.9734,7.5368);
SetPlayerFacingAngle(playerid, 270);
SetPlayerCameraPos(playerid, 226.7491,1823.0441,7.4141);
SetPlayerCameraLookAt(playerid, 220.3261,1822.9734,7.5368);
SetPlayerTeamFromClass(playerid, classid);
new teamname[24];
if(classid == 0)
{
TextDrawDestroy(info3[playerid]);
teamname = "I.N.F";
GameTextForPlayer(playerid,"~r~Internationalforces",3000,3);
}
else if(classid == 1)
{
TextDrawDestroy(info3[playerid]);
teamname = "Daesh";
GameTextForPlayer(playerid,"~r~Daesh",3000,3);
}
else if(classid == 2)
{
TextDrawDestroy(info3[playerid]);
teamname = "Iraq";
GameTextForPlayer(playerid,"~r~Iraq",3000,3);
}
if(classid == 3)
{
TextDrawDestroy(info3[playerid]);
teamname = "Unitedkingdom";
GameTextForPlayer(playerid,"~r~Unitedkingdom",3000,3);
}
else if(classid == 4)
{
TextDrawDestroy(info3[playerid]);
teamname = "Russian";
GameTextForPlayer(playerid,"~r~Russian",3000,3);
}
new classname[24];
if(gPlayerClass[playerid] == Ranger) classname = "Ranger";
if(gPlayerClass[playerid] == Sniper) classname = "Sniper";
if(gPlayerClass[playerid] == Engineer) classname = "Engineer";
if(gPlayerClass[playerid] == Terminator) classname = "Terminator";
if(gPlayerClass[playerid] == Pilot) classname = "Pilot";
if(gPlayerClass[playerid] == Spy) classname = "Spy";
if(gPlayerClass[playerid] == HeavyArmour) classname = "HeavyArmour";
format(pinfo3,sizeof(pinfo3), "~b~Team:~w~%s-~b~Class:~w~%s",teamname, classname);
info3[playerid] = TextDrawCreate(140.5 ,425 , pinfo3);
TextDrawShowForPlayer(playerid, info3[playerid]);
return 1;
}
PHP код:
public OnPlayerSpawn(playerid)
{
new pinfo3[128];
new teamname[24];
if(gTeam[playerid] == TEAM_Internationalforces) teamname = "I.N.F";
if(gTeam[playerid] == TEAM_Daesh) teamname = "Daesh";
if(gTeam[playerid] == TEAM_Iraq) teamname = "Iraq";
if(gTeam[playerid] == TEAM_Unitedkingdom) teamname = "Unitedkingdom";
if(gTeam[playerid] == TEAM_Russian) teamname = "Russian";
new classname[24];
if(gPlayerClass[playerid] == Ranger) classname = "Ranger";
if(gPlayerClass[playerid] == Sniper) classname = "Sniper";
if(gPlayerClass[playerid] == Engineer) classname = "Engineer";
if(gPlayerClass[playerid] == Terminator) classname = "Terminator";
if(gPlayerClass[playerid] == Pilot) classname = "Pilot";
if(gPlayerClass[playerid] == Spy) classname = "Spy";
if(gPlayerClass[playerid] == HeavyArmour) classname = "HeavyArmour";
format(pinfo3,sizeof(pinfo3), "~b~Team:~w~%s-~b~Class:~w~%s",teamname, classname);
info3[playerid] = TextDrawCreate(140.5 ,425 , pinfo3);
TextDrawShowForPlayer(playerid, info3[playerid]);
return 1;
}