Thread: [Ajuda] Adicionar TextDraw
View Single Post
Old 29/05/2020, 09:34 PM   #13
cicinho
Huge Clucker
 
cicinho's Avatar
 
Join Date: Feb 2015
Location: Brasil - Alagoas
Posts: 252
Reputation: 8
Default Re: Adicionar TextDraw

Quote:
Originally Posted by SkolPlay View Post
Não funcionou, nem tá aparecendo o textdraw
Tenta aí...

PHP Code:

new PlayerText:TextCash[MAX_PLAYERS],
    
Timer[MAX_PLAYERS];

public 
OnPlayerConnect(playerid)
{
    
TextCash[playerid] = CreatePlayerTextDraw(playerid29.000000296.933471"Cash:");
    
PlayerTextDrawLetterSize(playeridTextCash[playerid], 0.4499991.600000);
    
PlayerTextDrawAlignment(playeridTextCash[playerid], 1);
    
PlayerTextDrawColor(playeridTextCash[playerid], -1);
    
PlayerTextDrawSetShadow(playeridTextCash[playerid], 0);
    
PlayerTextDrawSetOutline(playeridTextCash[playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridTextCash[playerid], 51);
    
PlayerTextDrawFont(playeridTextCash[playerid], 1);
    
PlayerTextDrawSetProportional(playeridTextCash[playerid], 1);
    
PlayerTextDrawShow(playeridTextCash[playerid]);

    
Timer[playerid] = SetTimerEx("AtualizarCash"1000true"i"playerid);

    return 
true;
}

forward AtualizarCash(playerid);
public 
AtualizarCash(playerid)
{
    new 
String[36];
    
format(String36"Cash: %d"Cash[playerid]);
    
PlayerTextDrawSetString(playeridTextCash[playerid], String);
    return 
true;
}

public 
OnPlayerDisconnect(playerid)
{
    
KillTimer(Timer[playerid]);
    return 
true;

__________________


HostName: GTA Torcidas - [PC/Android]
Address: server.gtatorcidas.net:2009
Language: Portugues | Brasil PT-BR
Weburl: https://www.gtatorcidas.net
cicinho is offline   Reply With Quote