[Include] ColorPicker IN-GAME - 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] ColorPicker IN-GAME (
/showthread.php?tid=559943)
ColorPicker IN-GAME -
MakuPL - 26.01.2015
ColorPicker
Version: 1.1
Autor: Patryk "Maku" Makowski
Description:
With this include you can shake colors in game.
Screenshot:

* this version is fully english.
Functions:
Код:
native ShowPlayerColorPicker(playerid, pickerid, bool:showalpha = false, bool:showcancel = true);
native HidePlayerColorPicker(playerid, bool:call_callback = false, call_response = 0);
native
native OnColorPickerResponse(playerid, pickerid, color, response);
ShowPlayerColorPicker - show colorpicker for the player.
- playerid - Player ID
- pickerid - Picker ID
- showalpha - Can player change alpha? Boolean
- showcancel - If player can cancel this picker (true) or if player can't cancel, must accept color (false).
HidePlayerColorPicker - It's obvious.
- playerid - Player ID
- call_callback - if callback OnColorPickerResponse is to be performed
- call_response - if callback is true - what response is to be send?
OnColorPickerResponse - When a player has completed or interrupted choice of color
- playerid - Player ID
- pickerid - Picker ID
- color - Created color
- response - 0 - cancel, 1 - accept
Defines that you can change:
Код:
#define COLOR_PICKER_DIALOG_OPTION 6
#define COLOR_PICKER_DIALOG_SHOW 7
Number of consumed textdraws:
16 global textdraws
5 player textdraws
Download & Example:
Example -
http://pastebin.com/AmS5cNnc
v1.1 -
http://pastebin.com/6Zr0FAgn
--
I'm sorry for my bad english. I hope that description is understandable.
Re: ColorPicker IN-GAME -
Lordzy - 26.01.2015
This looks great, however the code can be slightly improved:
• Update your hooking method to latest hook method (hook method 7).
• This include would work properly for filterscripts only if "FILTERSCRIPT" is defined before including, a better way than that is to make it work for both filterscript and gamemode without any special defines -
http://forum.sa-mp.com/showpost.php?...4&postcount=12
Re: ColorPicker IN-GAME -
xStunt - 26.01.2015
Awesome
Re: ColorPicker IN-GAME -
TheRaGeLord - 26.01.2015
Nice
Re: ColorPicker IN-GAME -
Team_PRO - 26.01.2015
Looks good for me.