SA-MP Forums

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

Thread Tools Display Modes
Old 17/01/2014, 11:25 AM   #1
Join Date: Jan 2010
Location: Pigland
Posts: 3,351
Reputation: 190
Default Dynamic textdraws

Anybody here knows how to make dynamic textdraws? I mean like: a weapon shop with a list of weapons in arrays, then instead of creating a new textdraw for each weapon name, the script will read this array and auto create the textdraw. Any tip?
Face9000 is offline   Reply With Quote
Old 17/01/2014, 11:51 AM   #2
Blademaster680's Avatar
Join Date: Jul 2013
Location: On my Yamaha R6
Posts: 609
Reputation: 26
Default Re: Dynamic textdraws

You mean like in singleplayer? When you walk in ammunation you can buy weapons etc?

Blademaster680 is offline   Reply With Quote
Old 17/01/2014, 11:52 AM   #3
Join Date: Jan 2010
Location: Pigland
Posts: 3,351
Reputation: 190
Default Re: Dynamic textdraws

Emh i think you dont understand what i said.
Face9000 is offline   Reply With Quote
Old 17/01/2014, 12:52 PM   #4
[MG]Dimi's Avatar
Join Date: Mar 2011
Location: Serbia
Posts: 1,239
Reputation: 144
Default Re: Dynamic textdraws

14:57 [MG]Dimi Erm Face
14:57 Meelis13 lol
14:57 Meelis13 for shop i guess
14:57 [MG]Dimi Make enum with data
14:57 Beremix yes
14:57 [MG]Dimi ex.
14:58 [MG]Dimi Name
14:58 [MG]Dimi Price
14:58 [MG]Dimi Type (0 weapon, 1 vehicle)
14:58 *** Passord quit (User Disconnect: )
14:58 [MG]Dimi ShopID
14:58 *** Passord joined #MG
14:58 +++ Mini-Games has given op to Passord
14:58 *** DjJunior quit (Quit: ajax IRC Client)
14:58 [Air]Albers14 such skills, so many data much pawno
14:58 [Air]Albers14 xd
14:58 [MG]Dimi ID (vehicle if Type = 1 and weapon = 0)
14:58 *** DjJunior joined #MG
14:58 +++ Mini-Games has given voice to DjJunior
14:59 [MG]Dimi etc.
14:59 [MG]Dimi then you calculate start of textdraw
14:59 Passord so much
14:59 Passord sex
15:00 [MG]Dimi ex. x= 5, y = 200
15:00 [MG]Dimi and then offset
15:00 [MG]Dimi First item goes y (200) + x (Item ID = 0) * 25 (for example)
15:00 RadioBot RADIO NEWS: Party non stop with DjJunior - #MG RADIO
15:00 [MG]Dimi then you go item ID++
15:00 [MG]Dimi and in next it will be 200+ 1*25
15:00 [MG]Dimi third will be
15:01 [MG]Dimi 200+2*25
15:01 [MG]Dimi and os on
15:01 [MG]Dimi and so on*
15:01 [MG]Dimi if your enum is sItems
15:01 [MG]Dimi you make variable
15:02 [MG]Dimi new ShopItems[MAX_SHOP_ITEMS][sItems];
15:02 [MG]Dimi Define somewhere MAX_SHOP_ITEMS
15:02 [MG]Dimi and then to display certain shop you use loop
15:02 [MG]Dimi for(new i=0; i < MAX_SHOP_ITEMS; i++)
15:02 [MG]Dimi {
15:03 [MG]Dimi if(ShopItems[i][ShopID] == 1) //for example
15:03 [MG]Dimi {
15:03 Passord yes
15:03 [MG]Dimi /add it to shop textdraw group
15:03 [MG]Dimi }
15:03 [MG]Dimi }
15:03 [MG]Dimi and that's it
15:03 [MG]Dimi not that hard
15:03 [MG]Dimi And since you are **** IM gonna go post this in SA-Mp Topic

Quick tutorial I gave you on IRC while you were AFK.
Scripting Admin/Account/VIP Systems for $$$ using ZCMD,dcmd, Dini, MySQL and sscanf.Scripting IRC Systems with all possible functions. (Echo channels, Chat channels, Admin channels...)Long time Experience with IRC Systems.For both offers PM me
Mini Games ServerServer IP:
[MG]Dimi is offline   Reply With Quote
Old 17/01/2014, 01:00 PM   #5
Join Date: Apr 2013
Location: UK maybe :P
Posts: 498
Reputation: 69
Default Re: Dynamic textdraws

Can You Explain More?! Please
amirab is offline   Reply With Quote

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
[Include] :: iAchieve :: Dynamic Achievement System - (Notify-on-achieve) (Stylish Textdraws) (uses Y_INI for saving/loading) iPLEOMAX Includes 66 05/06/2017 01:30 PM
Global TextDraws on top of Player TextDraws [resolved] Joe Staff Scripting Help 0 17/05/2013 05:35 AM
[BUG] Selecting textdraws lighting up multiple textdraws Hiddos Scripting Help 3 24/03/2012 02:44 PM

All times are GMT. The time now is 11:52 AM.

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