text draw
#1

look at picture.When I choose my team.It happens on team:.


PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    new 
pinfo3[128];
    
SetPlayerPos(playerid220.3261,1822.9734,7.5368);
    
SetPlayerFacingAngle(playerid270);
    
SetPlayerCameraPos(playerid226.7491,1823.0441,7.4141);
    
SetPlayerCameraLookAt(playerid220.3261,1822.9734,7.5368);
    
SetPlayerTeamFromClass(playeridclassid);
    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] == Rangerclassname "Ranger";
    if(
gPlayerClass[playerid] == Sniperclassname "Sniper";
    if(
gPlayerClass[playerid] == Engineerclassname "Engineer";
    if(
gPlayerClass[playerid] == Terminatorclassname "Terminator";
    if(
gPlayerClass[playerid] == Pilotclassname "Pilot";
    if(
gPlayerClass[playerid] == Spyclassname "Spy";
    if(
gPlayerClass[playerid] == HeavyArmourclassname "HeavyArmour";
    
format(pinfo3,sizeof(pinfo3), "~b~Team:~w~%s-~b~Class:~w~%s",teamnameclassname);
    
info3[playerid] = TextDrawCreate(140.5 ,425 pinfo3);
    
TextDrawShowForPlayer(playeridinfo3[playerid]);
    return 
1;

PHP код:
public OnPlayerSpawn(playerid)
{
    new 
pinfo3[128];
    new 
teamname[24];
     if(
gTeam[playerid] == TEAM_Internationalforcesteamname "I.N.F";
      if(
gTeam[playerid] == TEAM_Daeshteamname "Daesh";
       if(
gTeam[playerid] == TEAM_Iraqteamname "Iraq";
       if(
gTeam[playerid] == TEAM_Unitedkingdomteamname "Unitedkingdom";
    if(
gTeam[playerid] == TEAM_Russianteamname "Russian";
    new 
classname[24];
    if(
gPlayerClass[playerid] == Rangerclassname "Ranger";
    if(
gPlayerClass[playerid] == Sniperclassname "Sniper";
    if(
gPlayerClass[playerid] == Engineerclassname "Engineer";
    if(
gPlayerClass[playerid] == Terminatorclassname "Terminator";
    if(
gPlayerClass[playerid] == Pilotclassname "Pilot";
    if(
gPlayerClass[playerid] == Spyclassname "Spy";
    if(
gPlayerClass[playerid] == HeavyArmourclassname "HeavyArmour";
    
format(pinfo3,sizeof(pinfo3), "~b~Team:~w~%s-~b~Class:~w~%s",teamnameclassname);
    
info3[playerid] = TextDrawCreate(140.5 ,425 pinfo3);
    
TextDrawShowForPlayer(playeridinfo3[playerid]);
return 
1;

Reply
#2

Quote:

format(pinfo3,sizeof(pinfo3), "~b~Team:~w~%s-~n~~b~Class:~w~%s",teamname, classname);

use this fixed
Reply
#3

Quote:
Originally Posted by LovelySoomro
Посмотреть сообщение
use this fixed
What is the difference with my code?
Reply
#4

see this
Reply
#5

what should I do now?
Reply
#6

first remove your that line and then copy this to that line and then check

Quote:

format(pinfo3,sizeof(pinfo3), "~b~Team:~w~%s-~n~~b~Class:~w~%s",teamname, classname);

Reply
#7

Thanks Solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)