PDA

View Full Version : How to put this textdraw.


gamersx
16/02/2017, 03:53 AM
Hello, i need help on this. I made this textdraw, so i want to put it on a command that i made.


new PlayerText:TDEditor_PTD[MAX_PLAYERS][5];

TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 731.199401, 385.053527, ".");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][0], 0.400000, 1.600000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][0], 19531.150390, 5710.096679);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][0], 2);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][0], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][0], -486539009);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], -258);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][0], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][0], 2);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], -258);

TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 708.398559, 405.253448, ".");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.400000, 1.600000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][1], -840.000000, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][1], 255);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][1], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);

TDEditor_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 140.399963, 358.746520, "ULTIMAS_NOTICIAS_LSTV");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][2], 0.803998, 4.659997);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][2], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][2], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][2], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][2], 2);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], 0);

TDEditor_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 728.799438, 365.106842, ".");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][3], 0.400000, 1.600000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][3], 19531.150390, 5710.096679);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][3], 2);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][3], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][3], -486539009);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], -258);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][3], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][3], 2);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], -258);

TDEditor_PTD[playerid][4] = CreatePlayerTextDraw(playerid, 602.399780, 4.360380, "EN_VIVO");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][4], 0.466000, 1.779999);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][4], 19531.150390, -79.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][4], 2);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][4], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][4], -486539009);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][4], -229);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][4], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][4], -229);



And the thing is to put it here:

CMD:camaraman(playerid, params[])
{
new userID;
if(sscanf(params, "u", userID)) return SendClientMessage(playerid, -1, "/spec [playerid]");
if(!IsPlayerConnected(userID)) return SendClientMessage(playerid, -1, "* No conectado.");
if(Info[playerid][pTvportatil] == 0) return SendClientMessage(playerid, COLOR_WHITE, "* No tienes una televisión portatil, consigue una en una Tienda de Electrónica.");
SetPlayerInterior(playerid, GetPlayerInterior(userID));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(userID));
AttachObjectToPlayer(FPS2[userID], playerid, 0.0, 0.15, 0.65, 0.0, 0.0, 0.0);
AttachCameraToObject(playerid, FPS2[userID]);
return 1;
}
CMD:apagartv(playerid, params[])
{
SetCameraBehindPlayer(playerid);
return 1;
}

On those two, the first i think its textdrawshowtoplayer, and the second textdrawhidetoplayer.

I tried that , but i get too many errors and warnings :(. i dont know how to solve it. thanks

ISmokezU
16/02/2017, 03:59 AM
Those are Player Textdraws, therefore you use

PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][0]);//To Show
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][0]);//To Hide

gamersx
16/02/2017, 04:12 AM
Hello, thanks for helping, that worked, the problem its that i only see one textdraw, i mean its not complete, that's because its playertextdraw right? i need the other?

morris91
16/02/2017, 06:20 AM
Hello, thanks for helping, that worked, the problem its that i only see one textdraw, i mean its not complete, that's because its playertextdraw right? i need the other?

You did change the numbers too right?
so,
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][0]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][1]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][2]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][3]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][4]);

And then same for DrawHide

MiiSha
16/02/2017, 06:20 AM
You have to show all of them, do this :


for(new i = 0; i < 5; i++)
{
TextDrawShowForPlayer(playerid, TDEditor_PTD[playerid][i]);
}


And to hide 'em :


for(new i = 0; i < 5; i++)
{
TextDrawHideForPlayer(playerid, TDEditor_PTD[playerid][i]);
}