|
|
#1 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Posts: 169
Reputation: 17
|
-Introduction:
Since the new functions and possibilities to click textdraws came out with 0.3e there's a lot of things you can do with textdraws now. One of the most basic things you can think of when looking at these functions are buttons. Even though basic, it may take 2, 3 or even more textdraws to create just ONE button and for scripts which require a lot of buttons it is a real pain in the you know what to create all those buttons manually one by one. This is the reason I created this include. With this include you can create (almost) fully customizable buttons with just ONE line of code. At first I created this just for personal use, but then I thought it might be useful for other people too, so I decided to release it. I know you guys don't like reading too much so let's get straight into the functions and features. -Functions: pawn Code:
Let's explain what they do one by one: pawn Code:
Every function is explained with the comments. -Features:
-How to use: In order to be able to use this include you have to follow these simple steps: 1. Download the file below. 2. Extract the buttons.inc file into your "\pawno\include" directory. 3. Extract the .amx and .pwn file of the test Filterscript in your "filterscripts" directory (optional). 4. Add the following line on top of your scripts with the other includes: pawn Code:
pawn Code:
7. You are DONE and ready to use all the functions. -Known Bugs: I'm not aware of any bugs bugs at the moment but it is possible to find bugs because I haven't worked much with textdraws before and the script isn't fully tested. If you find any feel free to report it below and I'll try to fix them with the next update. -Example: Version 1.1: Version 1.0: -Download: Version 1.1: ![]() Version 1.0: ![]() -Notes:
-Screenshots: ![]() ![]() ![]() -ChangeLog: Code:
V1.0: Initial Release V1.1: -Added GetButtonpos Function -Added GetButtonSize Function -Added GetButtonColors Function -Added GetButtonText Function -Hooked OnPlayerClickTextdraw so you don't need to add anything else on your code beside OnPlayerClickButton -Makes usage of Global Textdraws instead of Player TDs (to avoid bugs with the Hooked function) -Small bug fixes with DestroyButton and DestroyButtonForPlayer Last edited by SpiritEvil; 07/04/2012 at 04:51 PM. Reason: Updated to v1.1 |
|
|
|
|
|
#2 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Mar 2009
Posts: 1,293
Reputation: 133
|
A screenshot please.
|
|
|
|
|
|
#3 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Posts: 169
Reputation: 17
|
|
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
Hook the callback instead of telling people to put it on the callback.
|
|
|
|
#5 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Posts: 169
Reputation: 17
|
|
|
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
|
|
|
|
#7 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Posts: 169
Reputation: 17
|
|
|
|
|
|
|
#8 |
|
Guest
Posts: n/a
|
|
|
|
|
#9 | |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Posts: 169
Reputation: 17
|
Quote:
![]() Edit: Code:
warning 200: symbol "_ALS_OnPlayerClickPlayerTextDra" is truncated to 31 characters |
|
|
|
|
|
|
#10 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Posts: 169
Reputation: 17
|
Updated to Version 1.1, enjoy
![]() The following is added: pawn Code:
Last edited by SpiritEvil; 07/04/2012 at 04:50 PM. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Buttons.inc | RealMan2 | Help Archive | 2 | 19/06/2011 09:18 AM |
| where to find THE buttons include ? | abubaker98 | Help Archive | 5 | 08/06/2011 10:43 PM |
| Where to find the Buttons include | TheMaddox | Help Archive | 3 | 24/04/2011 02:07 PM |
| GUI buttons. | DyDy | Help Archive | 3 | 04/09/2010 08:57 AM |