Recon Help!
#1

if i go on spec someone i dont see health and the things.. you know..i hope you see
PHP код:
 public Spectator()
      {
      new 
string[350];
      for(new 
0MAX_PLAYERSi++)
      {
      if(
IsPlayerConnected(i))
      {
      if(
Spectate[i] != 255)
      {
      new 
targetid Spectate[i];
      if(
IsPlayerConnected(targetid))
      {
      if(
PlayerInfo[i][pAdmin] >= 1)
      {
      new 
Float:health,Float:armour,Float:health2;
      new 
name[MAX_PLAYER_NAME];
      new 
money GetPlayerMoney(targetid);
      new 
carid GetPlayerVehicleID(targetid);
      new 
bankmoney PlayerInfo[targetid][pAccount];
      
GetPlayerName(targetidnamesizeof(name));
      
GetPlayerHealth(targetidhealth);
      
GetPlayerArmour(targetidarmour);
      
GetVehicleHealth(caridhealth2);
      if(!
IsPlayerInAnyVehicle(targetid))
      {
      
format(stringsizeof(string),"~p~- ~h~%s (ID: %d) ~p~-~n~~n~~n~ ~b~Health: ~w~%.1f ~g~:-: ~b~Armour: ~w~%.1f ~n~ ~b~Money: ~w~$%d ~g~:-: ~b~Bank: ~w~$%d",name,targetid,health,armour,money,bankmoney);
      
TextDrawSetString(Textdraw54[i],string);
      }
      else
      {
      
format(stringsizeof(string),"~p~- ~h~%s (ID: %d) ~p~-~n~~n~~n~ ~b~Health: ~w~%.1f ~g~:-: ~b~Armour: ~w~%.1f ~n~ ~b~Money: ~w~$%d ~g~:-: ~b~Bank: ~w~$%d ~n~~n~~g~---------------------------------------------------~n~~n~ ~b~Vehicle ID: ~w~%d ~b~Vehicle HP: ~w~%.1f ~n~~n~",name,targetid,health,armour,money,bankmoney,carid,health2);
      
TextDrawSetString(Textdraw54[i],string);
      }
      }
      if(
GetPlayerVirtualWorld(targetid) > 0)
      {
      
SetPlayerVirtualWorld(i,GetPlayerVirtualWorld(targetid));
      }
      }
//Targetid connected
      
}
      }
      }
      } 
i added this


PHP код:
Textdraw54[playerid] = TextDrawCreate(331.000000340.000000" "); // Spectate
                        
TextDrawAlignment(Textdraw54[playerid], 2);
                        
TextDrawBackgroundColor(Textdraw54[playerid], 255);
                        
TextDrawFont(Textdraw54[playerid], 1);
                        
TextDrawLetterSize(Textdraw54[playerid], 0.5000001.000000);
                        
TextDrawColor(Textdraw54[playerid], -1);
                        
TextDrawSetOutline(Textdraw54[playerid], 0);
                        
TextDrawSetProportional(Textdraw54[playerid], 1);
                        
TextDrawSetShadow(Textdraw54[playerid], 0); 
PHP код:
                if(strcmp(cmd"/spectate"true) == 0)
                        {
                        if (
PlayerInfo[playerid][pAdmin] >= 1)
                        {
                        if(
IsPlayerConnected(playerid))
                        {
                            
tmp strtok(cmdtextidx);
                            if(!
strlen(tmp)) {
                            
SendClientMessage(playeridCOLOR_WHITE"USAGE: /spectate [playerid]");
                            return 
1;
                            }
                            
specplayerid strval(tmp);
                            if(!
IsPlayerConnected(specplayerid)) {
                            
SendClientMessage(playeridCOLOR_RED"SpectatePlayer: That player isn't active.");
                            return 
1;
                            }
                            
tmp strtok(cmdtextidx);
                            if (
PlayerInfo[playerid][pAdmin] >= 1)
                            {
                                
TogglePlayerSpectating(playerid1);
                                
PlayerSpectatePlayer(playeridspecplayerid);
                                
TextDrawShowForPlayer(playeridTextdraw54[playerid]);
                                
SetPlayerInterior(playerid,GetPlayerInterior(specplayerid));
                                
gSpectateID[playerid] = specplayerid;
                                
gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER;
                                return 
1;
                            }
                            else
                            {
                                
SendClientMessage(playeridCOLOR_GRAD1"   you are not authorized to use that command!");
                            }
                        }
                        }
                        return 
1;
                        } 
Reply
#2

anyone?if i go /spectate on someone i dont see the textdraw54 like that players Health..and as you see
Reply
#3

. BUMP
Reply
#4

could it be you set the text draw text to empty?
pawn Код:
TextDrawCreate(331.000000, 340.000000, " ")
then later in your code i sont see you updating this TD with the info you want to see
Reply
#5

i change and nothing.. (
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)