SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 07/06/2017, 04:57 AM   #1
iAmir
Banned
 
Join Date: May 2017
Location: Iran
Posts: 112
Reputation: 191
Spray iMenu.inc v1.2| Clickable TextDraw Menus | CS Buy Menu Style

iMenu.inc
v1.2

by iAmir

Start and Informations

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 :




Change log:
Code:
15/10/2017 - v1.2
  • Added function iMenu_RemoveItem to remove items
  • Added function iMenu_SetDefaultPreview
19/06/2017 - v1.1
  • Increased item limits per menu up to 16 !
  • Added parameters to able change colors of different parts
  • Added new parameter 'modelid' to 'iMenuPlayerResponse'
07/06/2017 - v1 Released
Functions and details
PHP Code:

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 Code:
stock iMenu_AddItem(playerid im_item_number im_item_string[] , im_description[] , im_preview_model = -Float:im_rx 0.0 Float:im_ry 0.0 Float:im_rz 0.0 Float:im_zoom 1.0 itemtextcolor=0xFFFFFFFF ,desc_col=-5963521previewbg 255 vehcol1=-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 Code:

stock iMenu_HideForPlayer
(playerid)
//Hides menu 
// playerid - ID of player 
PHP Code:

stock iMenu_SetDefaultPreview
(playerid im_preview_model = -Float:im_rx 0.0 Float:im_ry 0.0 Float:im_rz 0.0 Float:im_zoom 1.0 previewbg 255 vehcol1=-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 Code:

stock iMenu_RemoveItem
(playerid im_item_number)
// removes a specific item
// playerid - ID of player
// im_item_number - Item Number 


Callbacks
[PHP]


PHP Code:

public iMenuPlayerSelectItem(playerid im_item)
// Call when player clicks on an item
// playerid - ID of Player
// im_item - Selected item 
PHP Code:

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 
Tutorials for colors:



  • 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)

Downloads

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

Last edited by iAmir; 14/02/2019 at 09:32 AM. Reason: New Update
iAmir is offline   Reply With Quote
Old 07/06/2017, 05:50 AM   #2
iLearner
Gangsta
 
iLearner's Avatar
 
Join Date: Apr 2017
Posts: 578
Reputation: 134
Default Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style

Not bad.
iLearner is offline   Reply With Quote
Old 07/06/2017, 06:09 AM   #3
Dice_
Huge Clucker
 
Dice_'s Avatar
 
Join Date: Sep 2015
Location: Indonesia
Posts: 450
Reputation: 56
Default Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style

Good job,would be nice if you provide how to change the colors.
Dice_ is offline   Reply With Quote
Old 07/06/2017, 09:18 PM   #4
iAmir
Banned
 
Join Date: May 2017
Location: Iran
Posts: 112
Reputation: 191
Default Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style

Quote:
Originally Posted by iLearner View Post
Not bad.
Would be nice if you share any idea that can make it better and more useful cause I'm not actually creative


Quote:
Originally Posted by Dice_ View Post
Good job,would be nice if you provide how to change the colors.
I'll add this feature for next update and add parameters for changing colors from default to everything you like

Last edited by iAmir; 14/10/2017 at 11:16 PM.
iAmir is offline   Reply With Quote
Old 07/06/2017, 09:27 PM   #5
Astralis
Guest
 
Posts: n/a
Default Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style

Cool textdraws.
  Reply With Quote
Old 10/06/2017, 11:51 AM   #6
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 1,948
Reputation: 504
Default Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style

Nice
SyS is offline   Reply With Quote
Old 10/06/2017, 12:23 PM   #7
X337
Gangsta
 
Join Date: Sep 2014
Location: Indonesia
Posts: 879
Reputation: 291
Default Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style

Cool, my suggestion is to add paginations so you will have a higher limit for menu items not only 12.
__________________
viva la sa-mp

Last edited by X337; 10/06/2017 at 02:12 PM.
X337 is offline   Reply With Quote
Old 10/06/2017, 12:38 PM   #8
coool
Gangsta
 
coool's Avatar
 
Join Date: Feb 2013
Location: Republic of Pakistan
Posts: 596
Reputation: 54
Default Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style

guud
__________________
coool is offline   Reply With Quote
Old 10/06/2017, 11:13 PM   #9
JesusChrysler
Little Clucker
 
Join Date: Nov 2014
Posts: 42
Reputation: 8
Default Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style

Great work.
JesusChrysler is offline   Reply With Quote
Old 12/06/2017, 11:12 AM   #10
iAmir
Banned
 
Join Date: May 2017
Location: Iran
Posts: 112
Reputation: 191
Default Re: iMenu.inc | Clickable TextDraw Menus | CS Buy Menu Style

Quote:
Originally Posted by X337 View Post
Cool, my suggestion is to add paginations so you will have a higher limit for menu items not only 12.
Yeah , I will add pagination

Quote:
Originally Posted by coool View Post
guud
Quote:
Originally Posted by SyS View Post
Nice
Quote:
Originally Posted by JesusChrysler View Post
Great work.
Thank y'all

Last edited by iAmir; 14/10/2017 at 11:16 PM.
iAmir is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way for handling custom textdraw menus? (enums, dialog style IDs) RajatPawar Scripting Help 2 08/10/2013 04:06 PM
Need help with simple shop menu with 0.3x menus. Jaanek Scripting Help 3 02/03/2013 04:32 PM
Menu's and second menus hanzen Help Archive 5 27/05/2009 10:10 PM


All times are GMT. The time now is 01:25 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.