SA-MP Forums

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

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 16/11/2017, 03:40 PM   #1
CaioTJF's Avatar
Join Date: Sep 2012
Location: Rio de Janeiro
Posts: 545
Reputation: 164
Default MenuStore (Build dynamic stores with TextDraws)

This include allows you to create many types of stores using Textdraws.


Click on the image to see the video.


PHP Code:
stock MenuStore_AddItem(playeriditemidmodelidname[], pricedescription[] = EOSFloat:description_size 0.0bool:description_line_jump truestack 1Float:rotX 0.0Float:rotY 0.0Float:rotZ 0.0Float:zoom 1.0
  • "itemid" - Item ID, will serve as "key", each item must have unique ID.
  • "modelid" - Model of the item that will be displayed in the preview.
  • "name" - Item name.
  • "price" - Item price.
  • "description" - Item description.
  • "Float:description_size" - Increase description box, value default is 0.0.
  • "bool:description_line_jump" - Automatic line break or not
  • "stack" - Above 1, the item can be stacked in the cart.
  • "rotX", "rotY", "rotZ" - Preview Rotation.
  • "Float:zoom " - Preview Zoom.

PHP Code:
stock MenuStore_Open(playeridmenuid[], store_name[], money_sign[] = MS_DEFAULT_MONEY_SIGNbutton_confirm[] = MS_DEFAULT_CONFIRM
  • "menuid" - It works just like easyDialog, you can by any name without having to define it.
  • "store_name" - Store name.
  • "money_sign" - Money sign, the default is "$"
  • "button_confirm" - Name of the confirm button, the default value is "Buy".

Code Example

PHP Code:

if(strcmp(cmd"/store"true) == 0)
MenuStore_AddItem(playerid1342"Granade"500"Throw to explode."200);
MenuStore_AddItem(playerid2344"Molotov"500"Throw to set fire to something."200);
MenuStore_AddItem(playerid3346"9mm Pistol"500"Pistol with low firepower.");
MenuStore_AddItem(playerid4347"Silenced 9mm"500"Pistol with low firepower.");
MenuStore_AddItem(playerid5348"Desert Eagle"500"Pistol with high firepower.");
MenuStore_AddItem(playerid6349"Shotgun"500"Normal Shotgun.");
MenuStore_AddItem(playerid7350"Sawnoff Shotgun"500"Powerfull Shotgun.");
MenuStore_AddItem(playerid8351"Combat Shotgun"500"Powerfull Shotgun.");
MenuStore_AddItem(playerid9352"Micro SMG"500"Two-handed machine gun.");
MenuStore_AddItem(playerid10353"MP5"500"Machine gun.");
MenuStore_AddItem(playerid11355"AK-47"500"Powerfull Rifle.");
MenuStore_AddItem(playerid12356"M4"500"Powerfull Rifle.");
MenuStore_AddItem(playerid13372"Tec-9"500"Powerfull machine gun.");
MenuStore_AddItem(playerid14357"Country Rifle"500"Normal Rifle.");
MenuStore_AddItem(playerid15358"Sniper Rifle"500"Powerfull Rifle.");
MenuStore_Show(playeridWeapon_Shop"Shop Weapons");


GetPlayerMoney(playerid) < price)
SendClientMessage(playerid, -1"You don't have enough money.");

amount == 1) {
GivePlayerWeapon(playeridGetWeaponIDFromModel(modelid), 200);
    else {
GivePlayerWeapon(playeridGetWeaponIDFromModel(modelid), amount);
format(string128"You bought %dx %s"amountitemname);
SendClientMessage(playerid, -1string);
GivePlayerMoney(playerid, -price);

stock GetWeaponIDFromModel(modelid)
331idweapon 1// Brass Knuckles
case 333idweapon 2// Golf Club
case 334idweapon 3// Nightstick
case 335idweapon 4// Knife
case 336idweapon 5// Baseball Bat
case 337idweapon 6// Shovel
case 338idweapon 7// Pool Cue
case 339idweapon 8// Katana
case 341idweapon 9// Chainsaw
case 321idweapon 10// Double-ended Dildo
case 325idweapon 14// Flowers
case 326idweapon 15// Cane
case 342idweapon 16// Grenade
case 343idweapon 17// Tear Gas
case 344idweapon 18// Molotov Cocktail
case 346idweapon 22// 9mm
case 347idweapon 23// Silenced 9mm
case 348idweapon 24// Desert Eagle
case 349idweapon 25// Shotgun
case 350idweapon 26// Sawnoff
case 351idweapon 27// Combat Shotgun
case 352idweapon 28// Micro SMG/Uzi
case 353idweapon 29// MP5
case 355idweapon 30// AK-47
case 356idweapon 31// M4
case 372idweapon 32// Tec-9
case 357idweapon 33// Country Rifle
case 358idweapon 34// Sniper Rifle
case 359idweapon 35// RPG
case 360idweapon 36// HS Rocket
case 361idweapon 37// Flamethrower
case 362idweapon 38// Minigun
case 363idweapon 39;// Satchel Charge + Detonator
case 365idweapon 41// Spraycan
case 366idweapon 42// Fire Extinguisher
case 367idweapon 43// Camera



Sorry for my English, it's not my native language.
IP: / Website:

Last edited by CaioTJF; 21/11/2017 at 05:40 PM.
CaioTJF is offline   Reply With Quote

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
[Include] MenuStore (Crie lojas utilizando TextDraws) CaioTJF Lançamentos/Releases 61 10/05/2020 02:26 AM
Dynamic Textdraws. MartiQ Scripting Help 0 27/01/2014 07:43 PM
Dynamic textdraws Face9000 Scripting Help 4 17/01/2014 01:00 PM
[FilterScript] [0.3e]Niko_boy"s Vehicle Spawner Based on TextDraws [Build 1.1] Niko_boy Filterscripts 22 21/11/2012 02:47 PM
[Include] e_steam - Dynamic Streamer + Fast (2x) - Build 1 BlueFire_ Includes 15 17/10/2012 01:50 PM

All times are GMT. The time now is 10:48 AM.

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