SA-MP Forums Archive
[Ajuda] Textdraw nгo aparece - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Textdraw nгo aparece (/showthread.php?tid=583538)



Textdraw nгo aparece - maxblaya01 - 29.07.2015

Eu criei um sistema de Patente mais nao esta aparecendo na tela alguem sabe se esta faltando alguma coisa?, me ajudem ae...

PHP код:
#include <a_samp>
//News
new Text:TextPatente;
public 
OnFilterScriptInit()
{
    
TextPatente TextDrawCreate(40.000000,322.000000,"]Patente: "); //Crie sua textdraw
    
TextDrawAlignment(TextPatente,0);
    
TextDrawBackgroundColor(TextPatente,0x000000ff);
    
TextDrawFont(TextPatente,2);
    
TextDrawLetterSize(TextPatente,0.199999,1.500000);
    
TextDrawColor(TextPatente,0x00ff00ff);
    
TextDrawSetProportional(TextPatente,1);
    
TextDrawSetShadow(TextPatente,1);
    
TextDrawSetOutline(TextPatente1);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    new 
str[50];
    if(
GetPlayerScore(playerid) >= 10)
    {
        
format(strsizeof(str), "~g~Patente: ~w~Novato");
        
TextDrawSetString(TextPatentestr);
    }
    if(
GetPlayerScore(playerid) >= 300)
    {
        
format(strsizeof(str), "~g~Patente: ~w~mediano");
        
TextDrawSetString(TextPatentestr);
    }
    if(
GetPlayerScore(playerid) >= 600)
    {
        
format(strsizeof(str), "~g~Patente: ~w~amador");
        
TextDrawSetString(TextPatentestr);
    }
    if(
GetPlayerScore(playerid) >= 1000)
    {
        
format(strsizeof(str), "~g~Patente: ~w~master");
        
TextDrawSetString(TextPatentestr);
    }
    
TextDrawShowForPlayer(playeridTextPatente);
    return 
1;




Re: ME AJUDA AQUI - LockedLucas - 29.07.2015

Porra cara mais um tуpico sobre isso ? mds... espero uma resposta no que vocк jб criou, e se ninguйm responder tente resolver vocк mesmo.


Re: ME AJUDA AQUI - Dayvison_ - 29.07.2015

Cria um PlayerTextdraw pois esta ae e global


Re: ME AJUDA AQUI - IgorLuiz - 29.07.2015

Acho que nгo й necessбrio uma filterscript, pode colocar em seu GM... vamos lб

Defina a text draw no topo do seu GM.

PHP код:
new PlayerText:TextPatente[MAX_PLAYERS]; 
Coloque na "public OnPlayerConnect"
PHP код:
    TextPatente[playerid] = CreatePlayerTextDraw(playerid40.000000,322.000000"_");
    
PlayerTextDrawAlignment(playeridTextPatente[playerid],0);
    
PlayerTextDrawBackgroundColor(playeridTextPatente[playerid],0x000000ff);
    
PlayerTextDrawFont(playeridTextPatente[playerid],2);
    
PlayerTextDrawLetterSize(playeridTextPatente[playerid],0.199999,1.500000);
    
PlayerTextDrawColor(playeridTextPatente[playerid],0x00ff00ff);
    
PlayerTextDrawSetProportional(playeridTextPatente[playerid],1);
    
PlayerTextDrawSetShadow(playeridTextPatente[playerid],1);
    
PlayerTextDrawSetOutline(playeridTextPatente[playerid], 1); 
Agora adicione na "public OnPlayerSpawn(playerid)"

PHP код:
    new str[50];
    if(
GetPlayerScore(playerid) >= 10)
    {
        
format(strsizeof(str), "~g~Patente: ~w~Novato");
        
PlayerTextDrawSetString(playeridTextPatente[playerid], str);
    }
    if(
GetPlayerScore(playerid) >= 300)
    {
        
format(strsizeof(str), "~g~Patente: ~w~mediano");
        
PlayerTextDrawSetString(playeridTextPatente[playerid], str);
    }
    if(
GetPlayerScore(playerid) >= 600)
    {
        
format(strsizeof(str), "~g~Patente: ~w~amador");
        
PlayerTextDrawSetString(playeridTextPatente[playerid], str);
    }
    if(
GetPlayerScore(playerid) >= 1000)
    {
        
format(strsizeof(str), "~g~Patente: ~w~master");
        
PlayerTextDrawSetString(playeridTextPatente[playerid], str);
    }
    
PlayerTextDrawShow(playeridPlayerText:TextPatente[playerid]); 



Re: ME AJUDA AQUI - maxblaya01 - 29.07.2015

Quote:
Originally Posted by IgorLuiz
Посмотреть сообщение
Acho que nгo й necessбrio uma filterscript, pode colocar em seu GM... vamos lб

Defina a text draw no topo do seu GM.

PHP код:
new PlayerText:TextPatente[MAX_PLAYERS]; 
Coloque na "public OnPlayerConnect"
PHP код:
    TextPatente[playerid] = CreatePlayerTextDraw(playerid40.000000,322.000000"_");
    
PlayerTextDrawAlignment(playeridTextPatente[playerid],0);
    
PlayerTextDrawBackgroundColor(playeridTextPatente[playerid],0x000000ff);
    
PlayerTextDrawFont(playeridTextPatente[playerid],2);
    
PlayerTextDrawLetterSize(playeridTextPatente[playerid],0.199999,1.500000);
    
PlayerTextDrawColor(playeridTextPatente[playerid],0x00ff00ff);
    
PlayerTextDrawSetProportional(playeridTextPatente[playerid],1);
    
PlayerTextDrawSetShadow(playeridTextPatente[playerid],1);
    
PlayerTextDrawSetOutline(playeridTextPatente[playerid], 1); 
Agora adicione na "public OnPlayerSpawn(playerid)"

PHP код:
    new str[50];
    if(
GetPlayerScore(playerid) >= 10)
    {
        
format(strsizeof(str), "~g~Patente: ~w~Novato");
        
PlayerTextDrawSetString(playeridTextPatente[playerid], str);
    }
    if(
GetPlayerScore(playerid) >= 300)
    {
        
format(strsizeof(str), "~g~Patente: ~w~mediano");
        
PlayerTextDrawSetString(playeridTextPatente[playerid], str);
    }
    if(
GetPlayerScore(playerid) >= 600)
    {
        
format(strsizeof(str), "~g~Patente: ~w~amador");
        
PlayerTextDrawSetString(playeridTextPatente[playerid], str);
    }
    if(
GetPlayerScore(playerid) >= 1000)
    {
        
format(strsizeof(str), "~g~Patente: ~w~master");
        
PlayerTextDrawSetString(playeridTextPatente[playerid], str);
    }
    
PlayerTextDrawShow(playeridPlayerText:TextPatente[playerid]); 
certo mano eu coloquei na gm, deu certo, so que quando eu entro no jogo nao aparece o textdraw com os nivel de patente, voce sabe o porque ?


Re: ME AJUDA AQUI - IgorLuiz - 29.07.2015

Quote:
Originally Posted by maxblaya01
Посмотреть сообщение
certo mano eu coloquei na gm, deu certo, so que quando eu entro no jogo nao aparece o textdraw com os nivel de patente, voce sabe o porque ?
tem certeza que colocou isto?
Код:
PlayerTextDrawShow(playerid, PlayerText:TextPatente[playerid]);
Eu testei aqui e apareceu!


Re: ME AJUDA AQUI - maxblaya01 - 29.07.2015

Quote:
Originally Posted by IgorLuiz
Посмотреть сообщение
tem certeza que colocou isto?
Код:
PlayerTextDrawShow(playerid, PlayerText:TextPatente[playerid]);
Eu testei aqui e apareceu!
sim, eu vou tentar em outra gm, para ver


Re: ME AJUDA AQUI - IgorLuiz - 29.07.2015

Vocк sabe onde fica o texdraw neh? Em cima do radar, eu coloquei em meu gm e a pareceu de boa, veja de novo, Ah algo de errado ae.


Re: ME AJUDA AQUI - maxblaya01 - 29.07.2015

Quote:
Originally Posted by IgorLuiz
Посмотреть сообщение
Vocк sabe onde fica o texdraw neh? Em cima do radar, eu coloquei em meu gm e a pareceu de boa, veja de novo, Ah algo de errado ae.
sim eu que criei ela em cima do radar, vou criar em outro lugar para ver '-'


Re: ME AJUDA AQUI - maxblaya01 - 29.07.2015

Quote:
Originally Posted by IgorLuiz
Посмотреть сообщение
Vocк sabe onde fica o texdraw neh? Em cima do radar, eu coloquei em meu gm e a pareceu de boa, veja de novo, Ah algo de errado ae.
nao funcionou tambйm, eu sou novato em pawno,mais sei la pra mim acho que esta falando alguma coisa, mais eu n sei oque й