SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/02/2017, 03:53 AM   #1
gamersx
Big Clucker
 
Join Date: Dec 2009
Posts: 72
Reputation: 1
Default How to put this textdraw.

Hello, i need help on this. I made this textdraw, so i want to put it on a command that i made.

pawn Code:
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:

pawn Code:
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
gamersx is offline   Reply With Quote
Old 16/02/2017, 03:59 AM   #2
ISmokezU
Gangsta
 
Join Date: Aug 2016
Posts: 542
Reputation: 75
Default Re: How to put this textdraw.

Those are Player Textdraws, therefore you use

Code:
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][0]);//To Show
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][0]);//To Hide
ISmokezU is offline   Reply With Quote
Old 16/02/2017, 04:12 AM   #3
gamersx
Big Clucker
 
Join Date: Dec 2009
Posts: 72
Reputation: 1
Default Re: How to put this textdraw.

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?
gamersx is offline   Reply With Quote
Old 16/02/2017, 06:20 AM   #4
morris91
Big Clucker
 
morris91's Avatar
 
Join Date: Feb 2008
Location: London, England
Posts: 138
Reputation: 32
Default Re: How to put this textdraw.

Quote:
Originally Posted by gamersx View Post
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
morris91 is offline   Reply With Quote
Old 16/02/2017, 06:20 AM   #5
MiiSha
Big Clucker
 
MiiSha's Avatar
 
Join Date: Jan 2017
Posts: 71
Reputation: 2
Default Re: How to put this textdraw.

You have to show all of them, do this :

Code:
	for(new i = 0; i < 5; i++)
	{
		TextDrawShowForPlayer(playerid, TDEditor_PTD[playerid][i]);
	}
And to hide 'em :

Code:
	for(new i = 0; i < 5; i++)
	{
		TextDrawHideForPlayer(playerid, TDEditor_PTD[playerid][i]);
	}
__________________
Marrakech City Roleplay v 1.1
Status : Closed

Looking for someone to start a project with ..
MiiSha is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Making a Health/armour textdraw! (Global textdraw) -Rebel Son- Tutorials 22 21/02/2020 01:27 AM
Moving a textdraw on the y-axis doesn't work. (TextDraw Editor) AndySedeyn Scripting Help 1 14/06/2014 02:50 PM
[FilterScript] [FS] TextDraw editor 0.6 - Multiple textdraw support, for proffesional textdraws Zamaroht Filterscripts 369 20/01/2013 02:46 PM
[Tutorial] --: Creating Textdraw's In The Easiest Way :-- [Helpful for textdraw creators] Nirzor Tutorials 15 04/10/2012 12:32 PM


All times are GMT. The time now is 05:05 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.