15.02.2015, 14:59
Amigo, fiz para vocк para vocк ter uma noзгo...
Primeiro defina:
Depois use uma stock para criar a TextDraw:
E entгo a coloque na 'OnPlayerConnect', para que a TextDraw seja criada...
E como exemplo, vamos usar 'OnPlayerSpawn' para mostrar a TextDraw para o player (no seu caso, seria para quando o player nгo estiver em um trabalho), use:
E entгo, quando o player entrar em um trabralho, use:
Espero ter ajudado... Recomendo que de uma olhada aqui 'TextDraw - SA-MP Wiki' para ter uma noзгo maior...
Primeiro defina:
PHP Code:
new Text:txd_trabalho[MAX_PLAYERS][1];
PHP Code:
stock criar_txd(playerid)
{
txd_trabalho[playerid][0] = TextDrawCreate(314.102874, 432.460144, "SEM TRABALHO NO MOMENTO DIGITE ~g~'/TRABALHAR'~w~ OU ~g~'/T'~w~ PARA INICIAR UM TRABALHO");
TextDrawLetterSize(txd_trabalho[playerid][0], 0.193000, 1.448800);
TextDrawTextSize(txd_trabalho[playerid][0], 15.000000, 718.500122);
TextDrawAlignment(txd_trabalho[playerid][0], 2);
TextDrawColor(txd_trabalho[playerid][0], -1);
TextDrawUseBox(txd_trabalho[playerid][0], 1);
TextDrawBoxColor(txd_trabalho[playerid][0], 255);
TextDrawSetShadow(txd_trabalho[playerid][0], 0);
TextDrawSetOutline(txd_trabalho[playerid][0], 0);
TextDrawBackgroundColor(txd_trabalho[playerid][0], 255);
TextDrawFont(txd_trabalho[playerid][0], 2);
TextDrawSetProportional(txd_trabalho[playerid][0], 1);
TextDrawSetShadow(txd_trabalho[playerid][0], 0);
}
PHP Code:
public OnPlayerConnect(playerid)
{
criar_txd(playerid);
return 1;
}
PHP Code:
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, txd_trabalho[playerid][0]);
return 1;
}
PHP Code:
TextDrawHideForPlayer(playerid, txd_trabalho[playerid][0]);