[Pedido] Textdraw!
#6

Quote:
Originally Posted by DarkBr
Посмотреть сообщение
Se vocк for usa-las mesmo sу quero meus Crйditos <Stone> Perdi 15 minutos da minha vida pra te ajudar!
Se der algum erro me notifique.


Код:
#include <a_samp>


new PlayerText:pNome[MAX_PLAYERS];              //TOPO
new Name;
new Jogador[MAX_PLAYERS];
forward PlayerTexT(playerid);

public OnGameModeInit()
{
	SetGameModeText("Feito Por Sr.Stone");
	Name = SetTimer("PlayerTexT",1000,true);
	return 1;
}


public OnPlayerConnect(playerid)
{
	pNome[playerid] = CreatePlayerTextDraw(playerid, 517.599975, 100.706604, "Nome:");//ignore
	PlayerTextDrawLetterSize(playerid, pNome[playerid], 0.300000, 1.3000);
	PlayerTextDrawAlignment(playerid, pNome[playerid], 1);
	PlayerTextDrawColor(playerid, pNome[playerid], -1);
	PlayerTextDrawSetShadow(playerid, pNome[playerid], 0);
	PlayerTextDrawSetOutline(playerid, pNome[playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, pNome[playerid], 51);
	PlayerTextDrawFont(playerid, pNome[playerid], 3);
	PlayerTextDrawSetProportional(playerid, pNome[playerid], 1);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
        KillTimer(Name);
	return 1;
}

public OnPlayerSpawn(playerid)
{
	PlayerTextDrawShow(playerid, PlayerText:pNome[playerid]);
	return 1;
}


public PlayerTexT(playerid)
{
	new Processo[128];
        GetPlayerName(playerid, Jogador, 23);
        format(Processo, sizeof(Processo), "~g~%s", Jogador);
        PlayerTextDrawSetString(playerid, pNome[playerid], Processo);
        return 1;
}

Night OF Crime
Nгo precisa criar um timer pra ficar atualizando! atй porque o jogador nгo vai ficar mudando de nome e o PlayerTextDrawSetString pode ser utilizado quando o player conecta
Reply


Messages In This Thread
Textdraw! - by Franklin0180 - 05.04.2017, 06:41
Re: Textdraw! - by PesadaO - 05.04.2017, 06:59
Re: Textdraw! - by Franklin0180 - 05.04.2017, 16:49
Re: Textdraw! - by HoodScript - 05.04.2017, 16:55
Re: Textdraw! - by DarkBr - 05.04.2017, 17:26
Re: Textdraw! - by HoodScript - 05.04.2017, 17:33
Re: Textdraw! - by DarkBr - 05.04.2017, 17:39
Re: Textdraw! - by DarkBr - 05.04.2017, 18:02
Re: Textdraw! - by ThiagoGamemodes - 05.04.2017, 18:33
Re: Textdraw! - by Kadett990 - 06.04.2017, 15:47

Forum Jump:


Users browsing this thread: 2 Guest(s)