SA-MP Forums Archive
[Include] 3D Text Label Tool-kit <::AKA::> Streamer! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] 3D Text Label Tool-kit <::AKA::> Streamer! (/showthread.php?tid=435689)



3D Text Label Tool-kit <::AKA::> Streamer! - CJay9209 - 08.05.2013

3D Text Label Streamer


Version: 1.0.0
Author: CJay9209 / tAxI / cptnsausage

Required Includes:

Foreach Include


Description:

This is pretty simple stuff. The default maximum number of 3dtext labels anyone can have active at any time is 1024. This streamer allows you to exceed that limit (in theory limitlessly). Default max is set to 5000 but it can be changed via the sourcecode.

No need to install manual hooks as it's all done for you in the include (ALS Hook Method)

Funtions:

- CreateStaticLabel(Text[], default_color, line_of_sight, Float: x, Float:y, Float:z, Float:draw_distance); :: Returns the Label ID

- CreateVehicleLabel(Text[], vehicleid, default_color, line_of_sight, Float: x_offset, Float:y_offset, Float:z_offset, Float:draw_distance); :: Returns the Label ID

- CreatePlayerLabel(Text[], playerid, default_color, line_of_sight, Float: x_offset, Float:y_offset, Float:z_offset, Float:draw_distance); :: Returns the Label ID

- DestroyLabel(labelid); :: Destroy's target Label ID

- SetLabelText(labelid, Text[]); :: Set's Label Text

- SetLabelPos(labelid, Float: x, Float:y, Float:z); :: Set Static Label Position - will fail on attached label

- SetLabelOffset(labelid, Float: x_offset, Float:y_offset, Float:z_offset); :: Set Attached Label Offset - will fail on Static label

- SetLabelDrawDistance(labelid, Float:draw_distance); :: Set the distance at which players will see the label

- SetLabelLineOfSight(labelid, line_of_sight); :: Sets the line of sight value (Test the line-of-sight so this text can't be seen through walls. 0/1)

************************************************** **************************************************
The entire system was coded by myself and released under the Mozilla V2 License. Please give credit if you intend to use any of my code in your script! Please report any bugs!
************************************************** **************************************************

====================================
Download HERE
====================================


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - Pottus - 08.05.2013

It looks coded well but a couple of things, I don't see a lot of people using this since incognito's streamer is definitely the best choice. Also you should implement foreach() for looping through players at the same time create your own iterators for keeping track of labels. I really don't see this useful at least in it's current form due to having triple for loops it's extremely inefficient.

4/10


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - CJay9209 - 08.05.2013

Oh nonsense there's a few double loops but no triple. Lol.

Just to clarify this is code based on my 8 year old script based streamer toolkit back when I invented code based streamers (yes I'm that guy). It will be getting more efficient but to be honest this was a side project I bashed out for a code library a few years back so meh. I've got a similar system to for each in the works as well as I am brutally aware of how many loops a lot of my code uses and it just hurts lol. But then again like I said, 8 years ago it was all we had... Also we had to walk uphill in blizzards with no shoes on... With a boner... U youngsters don't know how good you have it lol!


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - Pottus - 08.05.2013

Yee I misread the code last night (was falling asleep) my bad but I did really enjoy reading your reply.... I've been ice fishing before except it was going outside with just shoes on and underwear in a blizzard to pee at 3:00am when it's -30 heh.


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - CJay9209 - 09.05.2013

yeah - I made the mistake of getting married in a kilt at -40. Should have waited till summer hit but in calgary that could be anywhere between march and october lol


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - [WH]Marcos - 09.05.2013

Its a nice work, if you know what to do with it..


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - Konewka - 09.05.2013

Well done. The only reason why I want to use it is because you can move dynamically 3Dtext labels, I hope you will carry on with this include in terms of updates.


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - CJay9209 - 09.05.2013

It'll be updated tonight using foreach with custom iterators to really speed it up. Just having some I'd number trouble just now.


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - CJay9209 - 10.05.2013

UPDATE:

Efficiency increased tenfold Utillising foreach


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - CJay9209 - 15.05.2013

UPDATE:

bugfixes - specifically i forgot to add the include foreach at top - not major but still... FIXED!


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - Pottus - 15.05.2013

I'm glad you took the time to implement my suggestions looks much better now!


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - CJay9209 - 15.05.2013

yup. I recon at least 10 times more efficient and the custom iterator commands allow you to really make it easy to keep the stream ID slots organised without thinking too hard about it. Hell i managed to almost completely rid myself of those frikin validation enums... Almost but not quite - I left them in to act as a safety against using an edit command on a non-existant ID. I'll get round to streamlining some more once I've finished tweaking my TSYS include later


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - electrux - 16.05.2013

sorry... i am new... i wanna ask... how to use this? :-/ i sooooooo wanna use it


Re: 3D Text Label Tool-kit <::AKA::> Streamer! - Littlehelper - 17.05.2013

Nice!