SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 14/08/2011, 09:15 AM   #111
Intoxicated
Big Clucker
 
Join Date: Nov 2010
Posts: 55
Reputation: 7
Default Re: Text draw tips

My textdraw in my FS and my textdraw in my gamemode seem to collide, the string in the filterscript uses the textdrawcreate from the main gamemode, what is causing this?
Intoxicated is offline   Reply With Quote
Old 14/08/2011, 04:33 PM   #112
ModianO
Big Clucker
 
ModianO's Avatar
 
Join Date: Aug 2011
Location: Space, Moon.
Posts: 96
Reputation: 4
Default Re: Text draw tips

Aside of TextDrawShowForPlayer(playerid ,txt); Use TextDrawShowForAll(txt);
ModianO is offline   Reply With Quote
Old 24/02/2012, 02:32 PM   #113
Shadow_
Gangsta
 
Shadow_'s Avatar
 
Join Date: Nov 2008
Location: Vatican City
Posts: 519
Reputation: 44
Default Re: Text draw tips

Is there a way i can TextDrawSetString but for a particular player ...
__________________
Shadow_ is offline   Reply With Quote
Old 24/02/2012, 03:03 PM   #114
T0pAz
Guest
 
Posts: n/a
Default Re: Text draw tips

Quote:
Originally Posted by Shadow_ View Post
Is there a way i can TextDrawSetString but for a particular player ...
Yes, you can but you need to assign it to a variable or make your own method(function).
  Reply With Quote
Old 24/02/2012, 03:14 PM   #115
Shadow_
Gangsta
 
Shadow_'s Avatar
 
Join Date: Nov 2008
Location: Vatican City
Posts: 519
Reputation: 44
Default Re: Text draw tips

sigh, i was hoping there was a default function.
__________________
Shadow_ is offline   Reply With Quote
Old 20/04/2012, 12:28 PM   #116
Universal Member
Little Clucker
 
Universal Member's Avatar
 
Join Date: Apr 2012
Location: ¯\_(*_*)_/¯
Posts: 10
Reputation: 0
Default Re: Text draw tips

Nice tutorail but i have some problem .I am using the following code !
pawn Code:
EclipseBlue[ 0 ] = TextDrawCreate(587.000000, 392.000000, "~b~F~b~~h~r~b~e~b~r~b~~h~o~b~a~b~m~n~~b~M~b~~h~a~b~k~b~~h~e~b~~h~r~b~s");
    TextDrawAlignment(EclipseBlue[ 0 ], 2);
    TextDrawBackgroundColor(EclipseBlue[ 0 ], 255);
    TextDrawFont(EclipseBlue[ 0 ], 0);
    TextDrawLetterSize(EclipseBlue[ 0 ], 0.819998, 1.899999);
    TextDrawColor(EclipseBlue[ 0 ], 255);
    TextDrawSetOutline(EclipseBlue[ 0 ], 1);
    TextDrawSetProportional(EclipseBlue[ 0 ], 1)
but it is showing me as
Code:
Freroams Maers
the ~k is not showing up for me But why ? How to code this ?
Universal Member is offline   Reply With Quote
Old 14/05/2012, 12:12 PM   #117
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default Re: Text draw tips

Anyone have idea how to create Progress bar with textdraw??
SpiderWalk is offline   Reply With Quote
Old 14/05/2012, 05:02 PM   #118
Nero_3D
High-roller
 
Nero_3D's Avatar
 
Join Date: Jun 2007
Location: Germany
Posts: 2,840
Reputation: 671
Default AW: Re: Text draw tips

Quote:
Originally Posted by SpiderWalk View Post
Anyone have idea how to create Progress bar with textdraw??
Use three textdraws
  • The first is the border
  • The second one would be the whole bar just a bit darker as the real bar
  • And the last would be the real bar
As the original bars from gta-sa (health bar as example) -> IMAGE

The calculation is the easiest thing
pawn Code:
new
    Float: health
;
GetPlayerHealth(playerid, health);
/*
    100 hp = 50 px // 50 is the size of the bar
    health = x px // x would be the calculated size

    x = health * 50 / 100 = health * 0.5 = health / 2
*/

TextDrawTextSize(
    textdraw,
    150.0 + (health / 2), // 150.0 is start position of the textdraw
    3.6
); // TextDrawTextSize doesnt update the textdraw, so we show it again to the player
TextDrawShowForPlayer(playerid, textdraw);
Nero_3D is offline   Reply With Quote
Old 10/06/2012, 03:55 AM   #119
SampLoverNo123
Huge Clucker
 
SampLoverNo123's Avatar
 
Join Date: Dec 2011
Location: forum.sa-mp.com
Posts: 255
Reputation: 18
Default Re: Text draw tips

Thank you for this, today i made my first textdraw
__________________
Our factions are purged, we are looking for faction leaders, please come to our server and /report if you want to be one, you must know english and RP well, thank you server ip : 142.54.177.216:7777

Also make account on forums, so you can get your faction access on forums: www.pt-rp.co.cc
SampLoverNo123 is offline   Reply With Quote
Old 05/08/2012, 12:45 PM   #120
im
Huge Clucker
 
im's Avatar
 
Join Date: Mar 2012
Location: România
Posts: 213
Reputation: 21
Default Re: Text draw tips

Do I have to use TextDrawDestroy on OnPlayerDisconnect? What happens if I don't?
__________________
im 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
Help with Text Draw linthebigs Scripting Help 2 10/09/2012 08:02 AM
TEXT DRAW [SU]CHRiS Help Archive 1 19/02/2010 08:15 PM
[HELP] Text Draw Need TraNe15 Help Archive 6 19/09/2009 07:54 PM
HELP with Text Draw. linthebigs Help Archive 3 08/05/2009 06:58 PM


All times are GMT. The time now is 12:15 PM.


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