09.05.2013, 20:52
(
Последний раз редактировалось Drebin; 03.11.2014 в 14:30.
)
Tuningshop car color menu
I've spent some time and remade the car color selection menu used in the modshops all around San Andreas. It is at the exact same position and the colors/cursor also have the exact same size. All colours are exactly the ones used in the original modshops menu.
You are free to use this include however you want. You can modify it, extend it and take snippets out of it. But if you release something which uses this menu, remember to include/keep the credits
The menu uses player textdraws.
Functions
pawn Код:
CreateColorSelectionDialog(playerid);
pawn Код:
DestroyColorSelectionDialog(playerid);
pawn Код:
ShowPlayerColorSelectDialog(playerid);
HidePlayerColorSelectDialog(playerid);
pawn Код:
MoveColorDialogCursor(playerid, direction);
Possible directions:
pawn Код:
CURSOR_MOVE_UP
CURSOR_MOVE_DOWN
CURSOR_MOVE_LEFT
CURSOR_MOVE_RIGHT
pawn Код:
SelectCurrentColor(playerid);
pawn Код:
GetColorFromPosition(column, row);
Callbacks
pawn Код:
OnPlayerChangeSelectedColor(playerid, column, row)
pawn Код:
OnPlayerSelectColor(playerid, column, row)
Information
I have included an example gamemode down below to give you an easy example of how to use the menu. It uses commands to move the cursor, but if you want you can also use your arrow keys, you simply have to re-code it that way. You could also leave the cursor out and make the colors clickable, but that will take some rewriting.
Remember, you don't have to use it the way I coded it, you can re-write it however you want, I simply provide you the color menu itself.
Download
Include:(Place the carcoldialog.inc into pawno/includes)