[Ajuda] Textdraw nгo aparece
#1

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;

Reply
#2

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.
Reply
#3

Cria um PlayerTextdraw pois esta ae e global
Reply
#4

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]); 
Reply
#5

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 ?
Reply
#6

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!
Reply
#7

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
Reply
#8

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.
Reply
#9

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 '-'
Reply
#10

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 й
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)