[Ajuda] TextDraw Some [VELOCIMETRO]
#1

Bem Logo no servidor o velocimetro aparece




Entro no carro o velocimetro some (Nгo esta completo)


CODIGOS


Textdraw

PHP код:
         box[i] = TextDrawCreate(198.000000,395.000000,"_");
        
TextDrawUseBox(box[i],1);
        
TextDrawBoxColor(box[i],0x00000066);
        
TextDrawTextSize(box[i],460.000000,0.000000);
        
TextDrawAlignment(box[i],0);
        
TextDrawBackgroundColor(box[i],0x00000033);
        
TextDrawFont(box[i],3);
        
TextDrawLetterSize(box[i],0.5000004.800000);
        
//TextDrawLetterSize(box[i],1.000000,3.000000);
        
TextDrawColor(box[i],0xffffffff);
        
TextDrawSetOutline(box[i],1);
        
TextDrawSetProportional(box[i],1);
        
TextDrawSetShadow(box[i],1);
        
fahrzeug[i] = TextDrawCreate(198.000000,396.000000," ");
        
TextDrawAlignment(fahrzeug[i],0);
        
TextDrawBackgroundColor(fahrzeug[i],0x000000ff);
        
TextDrawFont(fahrzeug[i],1);
        
TextDrawLetterSize(fahrzeug[i],0.299999,1.000000);
        
TextDrawColor(fahrzeug[i],0xffffffff);
        
TextDrawSetOutline(fahrzeug[i],1);
        
TextDrawSetProportional(fahrzeug[i],1);
        
TextDrawSetShadow(fahrzeug[i],1);
        
mph[i] = TextDrawCreate(368.000000,396.000000," ");
        
TextDrawAlignment(mph[i],0);
        
TextDrawBackgroundColor(mph[i],0x000000ff);
        
TextDrawFont(mph[i],1);
        
TextDrawLetterSize(mph[i],0.299999,1.000000);
        
TextDrawColor(mph[i],0xffffffff);
        
TextDrawSetOutline(mph[i],1);
        
TextDrawSetProportional(mph[i],1);
        
TextDrawSetShadow(mph[i],1);
        
combustivelt[i] = TextDrawCreate(198.000000,408.000000," ");
        
TextDrawAlignment(combustivelt[i],0);
        
TextDrawBackgroundColor(combustivelt[i],0x000000ff);
        
TextDrawFont(combustivelt[i],1);
        
TextDrawLetterSize(combustivelt[i],0.299999,1.000000);
        
TextDrawColor(combustivelt[i],0xffffffff);
        
TextDrawSetOutline(combustivelt[i],1);
        
TextDrawSetProportional(combustivelt[i],1);
        
TextDrawSetShadow(combustivelt[i],1);
        
zustand[i] = TextDrawCreate(368.000000,408.000000," ");
        
TextDrawAlignment(zustand[i],0);
        
TextDrawBackgroundColor(zustand[i],0x000000ff);
        
TextDrawFont(zustand[i],1);
        
TextDrawLetterSize(zustand[i],0.299999,1.000000);
        
TextDrawColor(zustand[i],0xffffffff);
        
TextDrawSetOutline(zustand[i],1);
        
TextDrawSetProportional(zustand[i],1);
        
TextDrawSetShadow(zustand[i],1);
        
gps[i] = TextDrawCreate(198.000000,420.000000," ");
        
TextDrawAlignment(gps[i],0);
        
TextDrawBackgroundColor(gps[i],0x000000ff);
        
TextDrawFont(gps[i],1);
        
TextDrawLetterSize(gps[i],0.299999,1.000000);
        
TextDrawColor(gps[i],0xffffffff);
        
TextDrawSetOutline(gps[i],1);
        
TextDrawSetProportional(gps[i],1);
        
TextDrawSetShadow(gps[i],1);
        
hoehe[i] = TextDrawCreate(368.000000,420.000000," ");
        
TextDrawAlignment(hoehe[i],0);
        
TextDrawBackgroundColor(hoehe[i],0x000000ff);
        
TextDrawFont(hoehe[i],1);
        
TextDrawLetterSize(hoehe[i],0.299999,1.000000);
        
TextDrawColor(hoehe[i],0xffffffff);
        
TextDrawSetOutline(hoehe[i],1);
        
TextDrawSetProportional(hoehe[i],1);
        
TextDrawSetShadow(hoehe[i],1);
        
SPS[i] = TextDrawCreate(558.000000,418.000000,"  SPS 6.0");
        
TextDrawBackgroundColor(SPS[i], COR_WHITE);
        
TextDrawFont(SPS[i], 3);
        
TextDrawLetterSize(SPS[i], 0.500000,2.000000);
        
TextDrawColor(SPS[i], 255);
        
TextDrawSetOutline(SPS[i], 1);
        
TextDrawSetProportional(SPS[i], 1);
        
url[i] = TextDrawCreate(198.000000,432.000000,URLTHIAGO);
        
TextDrawAlignment(url[i],0);
        
TextDrawBackgroundColor(url[i],0x000000ff);
        
TextDrawFont(url[i],1);
        
TextDrawLetterSize(url[i],0.299999,1.000000);
        
TextDrawColor(url[i],0xffffffff);
        
TextDrawSetOutline(url[i],1);
        
TextDrawSetProportional(url[i],1);
        
TextDrawSetShadow(url[i],1); 
Public


PHP код:
public VeloThiago()
{
    new 
Float:Speedo_X,Float:Speedo_Y,Float:Speedo_Z;
    new 
Float:Speedo_HP;
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        new 
vehicle GetPlayerVehicleID(i);
        if(
IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
        {
            
GetPlayerPos(iSpeedo_XSpeedo_YSpeedo_Z);
            
GetPlayerVehicleID(i);
            new 
newcar GetPlayerVehicleID(i);
            
GetVehicleHealth(GetPlayerVehicleID(i), Speedo_HP);
            new 
str1[256],str2[256],str3[256],str4[256],str5[256],str6[256],str7[256];
            if(
SpeedoON[i] == 0)
            {
                
TextDrawShowForPlayer(ibox[i]);
                
TextDrawShowForPlayer(ifahrzeug[i]);
                
TextDrawShowForPlayer(imph[i]);
                
TextDrawShowForPlayer(icombustivelt[i]);
                
TextDrawShowForPlayer(izustand[i]);
                
TextDrawShowForPlayer(igps[i]);
                
TextDrawShowForPlayer(ihoehe[i]);
                
TextDrawShowForPlayer(iurl[i]);
                
SpeedoON[i] = 1;
            }
            
format(str1,sizeof(str1),"~w~~d~Veiculo: ~b~~h~~h~%s",vehName[GetVehicleModel(vehicle)-400]);
            
TextDrawSetString(fahrzeug[i], str1);
            
format(str2,sizeof(str2),"~w~~d~KM/H: ~y~%d",GetPlayerSpeed(itrue));
            
TextDrawSetString(mph[i], str2);
            
format(str3,sizeof(str3),"~w~~d~Combustivel: ~g~~h~%d%%"Gas[vehicle]);
            
TextDrawSetString(combustivelt[i], str3);
            if(
IsACopCar(newcar) || IsAExCar(newcar) || IsAnAmbulanceCar(newcar) || IsAPoliciaCivilCar(newcar) || IsAPFCar(newcar) || IsABOPEsCar(newcar) || IsAGOVCar(newcar))
            {
            
format(str4,sizeof(str4),"~w~~d~Blindagem: ~r~~h~Sim");
            }
            else
            {
            
format(str4,sizeof(str4),"~w~~d~Lataria: ~r~~h~%0.0f%%"Speedo_HP/10);
            }
            
TextDrawSetString(zustand[i], str4);
            
format(str5,sizeof(str5),"~w~~d~GPS: ~p~~h~%s"ReturnPlayerZone(i));
            
TextDrawSetString(gps[i], str5);
            
format(str6,sizeof(str6),"~w~~d~Altura: ~p~~h~%.1f"Speedo_Z);
            
TextDrawSetString(hoehe[i], str6);
            
format(str7,sizeof(str7),URLTHIAGO);
            
TextDrawSetString(url[i], str7);
        }
        
SavePlayerPos[i][sX] = Speedo_XSavePlayerPos[i][sY] = Speedo_YSavePlayerPos[i][sZ] = Speedo_Z;
    }
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(!
IsPlayerInAnyVehicle(i))
        {
            
TextDrawHideForPlayer(ibox[i]);
            
TextDrawHideForPlayer(ifahrzeug[i]);
            
TextDrawHideForPlayer(imph[i]);
            
TextDrawHideForPlayer(icombustivelt[i]);
            
TextDrawHideForPlayer(izustand[i]);
            
TextDrawHideForPlayer(igps[i]);
            
TextDrawHideForPlayer(ihoehe[i]);
            
TextDrawHideForPlayer(iurl[i]);
            
SpeedoON[i] = 0;
        }
        if(
spawnado[i] == 1)
        {
            if(
SpeedoON[i] >= 1)
            {
                
TextDrawHideForPlayer(iforum[i]);
            }
            if(
SpeedoON[i] <= 0)
            {
                
TextDrawShowForPlayer(iforum[i]);
            }
        }
    }

Me ajudem por favor , Obrigado
Reply
#2

Posta o OnPlayerConnect e OnPlayerRequestClass.
Reply
#3

Primeiramente deverias usar a funзгo CreatePlayerTextDraw isto para nгo atingir o limite mбximo de textdraws.
Depois й uma questгo de procurares onde a Textdraw de background й mostrada, pois eu suponho que esteja no OnPlayerConnect
Reply
#4

OnPlayerConnect

PHP код:
public OnPlayerConnect(playerid)
{
    
PlayAudioStreamForPlayer(playerid"http://dc584.4shared.com/img/3276137388/9003a8ec/dlink__2Fdownload_2FyUymRXoQ_3Ftsid_3D20130115-151114-aa7204f7/preview.mp3");
    
TextDrawShowForPlayer(playeridEntrada[playerid]);
    
TextDrawShowForPlayer(playeridSPS[playerid]);
    
DisablePlayerCheckpoint(playerid);
    
KillTimer(timer[playerid]);
    
StopAudioStreamForPlayer(playerid);
    
    
FilaAtendimentoText[playerid] = TextDrawCreate(500 ,150 "_");
    
TextDrawFont(FilaAtendimentoText[playerid] , 1);
    
TextDrawLetterSize(FilaAtendimentoText[playerid] , 0.3999991.300000);
    
TextDrawColor(FilaAtendimentoText[playerid] , 0xc4ff00FF);
    
TextDrawSetOutline(FilaAtendimentoText[playerid] , 1);
    
TextDrawSetProportional(FilaAtendimentoText[playerid] , true);
    
TextDrawSetShadow(FilaAtendimentoText[playerid] , 1);
    
TextDrawHideForPlayer(playerid,FilaAtendimentoText[playerid]);
    
TempoAtendimento2Text[playerid] = TextDrawCreate(500 ,165 "_");
    
TextDrawFont(TempoAtendimento2Text[playerid] , 1);
    
TextDrawLetterSize(TempoAtendimento2Text[playerid] , 0.3999991.300000);
    
TextDrawColor(TempoAtendimento2Text[playerid] , 0xc4ff00FF);
    
TextDrawSetOutline(TempoAtendimento2Text[playerid] , 1);
    
TextDrawSetProportional(TempoAtendimento2Text[playerid] , true);
    
TextDrawSetShadow(TempoAtendimento2Text[playerid] , 1);
    
TextDrawHideForPlayer(playerid,TempoAtendimento2Text[playerid]);
    
FilaAtendimento[playerid] = 999;
    
TempoAtendimento2[playerid] = 0;
    
glob000[playerid] = 0
OnPlayerRequestClass

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    if(
IsPlayerNPC(playerid))
    {
        
SpawnPlayer(playerid);
        return 
true;
    }
    new 
string[128];
    new 
string3[128];
    new 
ip[16];
    
GetPlayerIp(playeridipsizeof ip);
    
format(string3sizeof(string3), "Banidos/%s.ini"PlayerName(playerid));
    if(
fexist(string3)) //autoban
    
{
        
ClearChatbox(playerid10);
        
strmid(BanInfo[playerid][pMotivo], dini_Get(string3,"Motivo"), 0strlen(dini_Get(string3,"Motivo")), 255);
        
strmid(BanInfo[playerid][pAdmBan], dini_Get(string3,"Admin"), 0strlen(dini_Get(string3,"Admin")), 255);
        
strmid(BanInfo[playerid][pData], dini_Get(string3,"Data"), 0strlen(dini_Get(string3,"Data")), 255);
        
strmid(BanInfo[playerid][pHora], dini_Get(string3,"Hora"), 0strlen(dini_Get(string3,"Hora")), 255);
        
SendClientMessage(playeridCOLOR_WHITE"|_______________[ Informaзхes do Ban ]_______________|");
        
format(stringsizeof(string), "Seu Nick:[%s] estб Banido do {0000FF}Brasil Sao Paulo {00BFFF}Style."PlayerName(playerid));
        
SendClientMessage(playeridCOLOR_LIGHTREDstring);
        
format(stringsizeof(string), "Motivo: %s"BanInfo[playerid][pMotivo]);
        
SendClientMessage(playeridCOLOR_YELLOWstring);
        
format(stringsizeof(string), "Admin: %s"BanInfo[playerid][pAdmBan]);
        
SendClientMessage(playeridCOLOR_YELLOWstring);
        
format(stringsizeof(string), "Dia: %s, Hora: %s"BanInfo[playerid][pData], BanInfo[playerid][pHora]);
        
SendClientMessage(playeridCOLOR_YELLOWstring);
        
SendClientMessage(playeridCOLOR_YELLOW"Para revisгo de ban acesse nosso forum: www.********.com/Groups/SaoPauloStyle");
        
SendClientMessage(playeridCOLOR_YELLOW"Atenзгo: Vocк sу serб desbanido caso for inocente !");
        new 
stri[64], tmp[20], tmp2[20];
        
format(strisizeof(stri), "IPsBanidos/%s.ini",ip);
        
getdate(AnoMesDia);
        
format(tmp20"%d/%d/%d"DiaMesAno);
        
gettime(HoraMinutoSegundo);
        
format(tmp220"%d:%d:%d"HoraMinutoSegundo);
        if(
dini_Exists(stri))
        {
            
Kick(playerid);
        }
        else
        {
            
dini_Create(stri);
            
dini_Set(stri,"Motivo",BanInfo[playerid][pMotivo]);
            
dini_Set(stri,"Admin",BanInfo[playerid][pAdmBan]);
            
dini_Set(stri,"Data",BanInfo[playerid][pData]);
            
dini_Set(stri,"Hora",BanInfo[playerid][pHora]);
            
dini_Set(stri,"Nick",PlayerName(playerid));
        }
          
Kick(playerid);
    } 
Reply
#5

Tenta colocar isso no OnPlayerConnect:

TextDrawHideForPlayer(i, box[i]);

Se essa for a do box, eu imagino que seja..
Reply
#6

ERROR :/

PHP код:
C:\Users\samsunggu\Desktop\SPS Ls 2014\pawno\include\streamer.inc(487) : warning 219local variable "hitid" shadows a variable at a preceding level
C
:\Users\samsunggu\Desktop\SPS Ls 2014\gamemodes\SpSOwna2014.pwn(3400) : warning 202number of arguments does not match definition
C
:\Users\samsunggu\Desktop\SPS Ls 2014\gamemodes\SpSOwna2014.pwn(6612) : error 017undefined symbol "i"
C:\Users\samsunggu\Desktop\SPS Ls 2014\gamemodes\SpSOwna2014.pwn(8323) : warning 209: function "Streamer_OnPlayerDisconnect" should return a value
C
:\Users\samsunggu\Desktop\SPS Ls 2014\gamemodes\SpSOwna2014.pwn(58337) : warning 219local variable "sendername" shadows a variable at a preceding level
C
:\Users\samsunggu\Desktop\SPS Ls 2014\gamemodes\SpSOwna2014.pwn(58462) : warning 235: public function lacks forward declaration (symbol "IsModelABike")
C:\Users\samsunggu\Desktop\SPS Ls 2014\gamemodes\SpSOwna2014.pwn(58506) : warning 203symbol is never used"Ficha"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)