[Include] ColorPicker IN-GAME
#1

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.
Reply
#2

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
Reply
#3

Awesome
Reply
#4

Nice
Reply
#5

Looks good for me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)