07.06.2017, 03:57
(
Последний раз редактировалось iAmir; 14.02.2019 в 08:32.
Причина: New Update
)
iMenu.inc
v1.2
by iAmir
Start and Informationsv1.2
by iAmir
Clickable TextDraw menu , designed with iPLEOMAX's TextDraw Editor .
it can be used for shops , inventories , team selections in TDM or anything else,
Thanks for your support.
Video
Click on meh
Screen Shots :
![](https://preview.ibb.co/kjpFJF/1.png)
Change log:
Код:
15/10/2017 - v1.2
- Added function iMenu_RemoveItem to remove items
- Added function iMenu_SetDefaultPreview
- Increased item limits per menu up to 16 !
- Added parameters to able change colors of different parts
- Added new parameter 'modelid' to 'iMenuPlayerResponse'
Released
PHP код:
stock iMenu_ShowForPlayer(playerid , im_menuid , im_caption[] , framecolor = 128 , headercolor = 128 , bordercolor = -5963521 , captioncolor = -5963521 , buttoncolor = 255 , mainbuttontextcolor = 0xFFFFFFFF , noprevtextcolor = 0xFFFFFFFF)
// It shows the frame and some datils of menu and makes it ready to add items
// playerid - ID of Player
// im_menuid - ID of menu (you can define)
// im_caption - caption of menu , like in screen shots and the video
// framecolor - Info in Tutorials of Colors
// headercolor - Info in Tutorials of Colors
// bordercolor - Info in Tutorials of Colors
// captioncolor - Info in Tutorials of Colors
// buttoncolor - Info in Tutorials of Colors
// mainbuttontextcolor - Info in Tutorials of Colors
// noprevtextcolor - Info in Tutorials of Colors
PHP код:
stock iMenu_AddItem(playerid , im_item_number , im_item_string[] , im_description[] , im_preview_model = -1 , Float:im_rx = 0.0 , Float:im_ry = 0.0 , Float:im_rz = 0.0 , Float:im_zoom = 1.0 , itemtextcolor=0xFFFFFFFF ,desc_col=-5963521, previewbg = 255 , vehcol1=-1 , vehcol2=-1)
// adds items up to 12
// playerid - ID of player
// im_item_number - the number of item which is from 0 to 12
// im_item_string - the text or caption of item
// im_description - description of this item (like in screen shots and the video)
// im_preview_model - ID of object for showing in a box for this item (can be blank not be used then it shows NO PREVIEW )
// Float:im_rx - Rot X if this item uses preview model
// Float:im_ry - Rot Y if this item uses preview model
// Float:im_rz - Rot Z if this item uses preview model
// Float:im_zoom - Zoom if this item uses preview model
// itemtextcolor - Info in Tutorials of Colors
// desc_col - Info in Tutorials of Colors
// previewbg - Info in Tutorials of Colors
// vehcol1 - Info in Tutorials of Colors
// vehcol2 - Info in Tutorials of Colors
PHP код:
stock iMenu_HideForPlayer(playerid)
//Hides menu
// playerid - ID of player
PHP код:
stock iMenu_SetDefaultPreview(playerid , im_preview_model = -1 , Float:im_rx = 0.0 , Float:im_ry = 0.0 , Float:im_rz = 0.0 , Float:im_zoom = 1.0 , previewbg = 255 , vehcol1=-1 , vehcol2=-1)
// to set default preview model before selecting any items
// playerid - ID of player
// im_preview_model - ID of object for showing in the box
// Float:im_rx - Rot X if this item uses preview model
// Float:im_ry - Rot Y if this item uses preview model
// Float:im_rz - Rot Z if this item uses preview model
// Float:im_zoom - Zoom if this item uses preview model
// previewbg - Info in Tutorials of Colors
// vehcol1 - Info in Tutorials of Colors
// vehcol2 - Info in Tutorials of Colors
PHP код:
stock iMenu_RemoveItem(playerid , im_item_number)
// removes a specific item
// playerid - ID of player
// im_item_number - Item Number
Callbacks
[PHP]
PHP код:
public iMenuPlayerSelectItem(playerid , im_item)
// Call when player clicks on an item
// playerid - ID of Player
// im_item - Selected item
PHP код:
public iMenuPlayerResponse(playerid , imenuid , itemid , modelid)
// Call when player clicks on Select while he already selected an item
// playerid - ID of player
// imenuid - ID of menu
// itemid - ID of selected item
// modelid - Model id of preview model object of selected item
![](https://preview.ibb.co/g2AXsk/sa_mp_003.png)
- 1 - headercolor - Color of header
- 2 - captioncolor - Color of caption text
- 3 - itemtextcolor - Color of item text
- 4 - buttoncolor - Color of button background including Select , Cancel , and Item buttons
- 5 - framecolor - Color of main frame
- 6 - previewbg - Color of preview model background
- 7 - bordercolor - Color of main borders of buttons and preview model box
- 8 - desc_col - Color of description text under the preview model box
- 9 - mainbuttontextcolor - Color of Select and Cancel buttons
- 10 - noprevtextcolor - Color of 'NO PREVIEW' text
- 11 - vehcol1 - First color of vehicle (only works if object model is a vehicle)
- 12 - vehcol2 - Second color of vehicle (only works if object model is a vehicle)
New
iMenu.inc v1.2 : Pastebin
Old(s)
iMenu.inc v1.1 : Pastebin.com
example : Pastebin.com
iMenu.inc v1 : Pastebin.com
example : Pastebin.com
Credits
iPLEOMAX - for his edtior
Me - for scripting this include