SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 01/12/2017, 04:05 PM   #21
CaioTJF
Gangsta
 
CaioTJF's Avatar
 
Join Date: Sep 2012
Location: Rio de Janeiro
Posts: 540
Reputation: 148
Default Re: MenuStore (Build dynamic stores with TextDraws)

Quote:
Originally Posted by Sellize View Post
I really, really appreciate this. This is so awesome and it looks great.

Thank you!

edit: server seems to crash after OnPlayerSpawn, any idea why this happens?

edit2: crashdetect log:

Code:
[12:30:53] [debug] Server crashed while executing script.amx
[12:30:53] [debug] AMX backtrace:
[12:30:53] [debug] #0 native CallLocalFunction () [004743b0] from samp-server.exe
[12:30:53] [debug] #1 00008bec in ?? (0x00000000, 0x00001b5b, 0x00000001, 0xffffffff, 0x04d02218, 0x00000001, 0x00000000, 0x00000000, 0x00000014, 0x00000000, ... <1073741813 arguments>) from script.amx
[12:30:53] [debug] #2 00020f58 in public OnDialogResponse (0x00000000, 0x00001b5b, 0x00000001, 0xffffffff, 0x04d02218) from script.amx
Thanks for reporting it, fixed.

Version 4.1 (thanks Jelly)

- Fixed crash on OnDialogResponse (CallLocalFunction removed from callbacks)
- Little adjustments
__________________

IP: 35.196.228.74:2009 / Website: www.gtatorcidas.net



CaioTJF is offline   Reply With Quote
Old 25/02/2018, 07:59 PM   #22
drawax
Little Clucker
 
Join Date: Jun 2012
Posts: 4
Reputation: 0
Default Re: MenuStore (Build dynamic stores with TextDraws)

Hello!


For me it only shows 3 characters of the names and descriptions, why is that? For example it only shows "Gra" or "Mol" etc... Thanks.

Last edited by drawax; 25/02/2018 at 09:46 PM.
drawax is offline   Reply With Quote
Old 01/05/2018, 08:00 PM   #23
GSFBart
Big Clucker
 
Join Date: Apr 2017
Location: Brazil
Posts: 94
Reputation: 6
Default Re: MenuStore (Build dynamic stores with TextDraws)

Quote:
Originally Posted by drawax View Post
Hello!


For me it only shows 3 characters of the names and descriptions, why is that? For example it only shows "Gra" or "Mol" etc... Thanks.
Replace

PHP Code:
strpack(ms_Items[playerid][i][ms_ItemName], name);
strpack(ms_Items[playerid][i][ms_ItemDescription], description); 
for

PHP Code:
strpack(ms_Items[playerid][i][ms_ItemName], name32 char);
strpack(ms_Items[playerid][i][ms_ItemDescription], description256 char); 
GSFBart is offline   Reply With Quote
Old 29/11/2018, 10:37 PM   #24
PowerMwK
Big Clucker
 
Join Date: Sep 2016
Location: Brazil - Ba
Posts: 187
Reputation: 4
Default Re: MenuStore (Build dynamic stores with TextDraws)

Maybe a little evolution.
__________________
AUTOEXEC CONFIG TO TF2.
autoexec.zip - 6 KB
PowerMwK is offline   Reply With Quote
Old 20/01/2019, 12:31 PM   #25
TheLeech
Big Clucker
 
Join Date: Aug 2015
Location: Under your bed
Posts: 134
Reputation: 5
Default Re: MenuStore (Build dynamic stores with TextDraws)

Really nice include love the style of the stores but it does this for me in game?



Code:
MenuStore_AddItem(playerid, 1, 2703, "Chicken Burger", 50, "A food item that can be consumed, Heals you +20.", 200, true, 0, 0, 2);
			    MenuStore_AddItem(playerid, 2, 2769, "Chicken Wrap", 50, "A food item that can be consumed, Heals you +20.", 200, true, 0, 0, 2);
			    MenuStore_AddItem(playerid, 3, 2768, "Double Chicken Burger", 75, "A food item that can be consumed, Heals you +40.", 200, true, 0, 0, 2);
			    MenuStore_AddItem(playerid, 4, 2703, "Burger Meal Deal", 100, "A food item that can be consumed, Heals you +60.", 200, true, 0, 0, 2);
			    MenuStore_AddItem(playerid, 5, 2814, "12inch Pizza", 150, "A food item that can be consumed, Heals you to full health.", 200, true, 0, 0, 2);
			    MenuStore_Show(playerid, Pizza_Shop, "Airport Pizza Stack");
It also doesn't update the total price at the bottom for me, Or take the money away?
TheLeech is offline   Reply With Quote
Old 28/01/2019, 04:36 AM   #26
CaioTJF
Gangsta
 
CaioTJF's Avatar
 
Join Date: Sep 2012
Location: Rio de Janeiro
Posts: 540
Reputation: 148
Default Re: MenuStore (Build dynamic stores with TextDraws)

Quote:
Originally Posted by TheLeech View Post
Really nice include love the style of the stores but it does this for me in game?



Code:
MenuStore_AddItem(playerid, 1, 2703, "Chicken Burger", 50, "A food item that can be consumed, Heals you +20.", 200, true, 0, 0, 2);
			    MenuStore_AddItem(playerid, 2, 2769, "Chicken Wrap", 50, "A food item that can be consumed, Heals you +20.", 200, true, 0, 0, 2);
			    MenuStore_AddItem(playerid, 3, 2768, "Double Chicken Burger", 75, "A food item that can be consumed, Heals you +40.", 200, true, 0, 0, 2);
			    MenuStore_AddItem(playerid, 4, 2703, "Burger Meal Deal", 100, "A food item that can be consumed, Heals you +60.", 200, true, 0, 0, 2);
			    MenuStore_AddItem(playerid, 5, 2814, "12inch Pizza", 150, "A food item that can be consumed, Heals you to full health.", 200, true, 0, 0, 2);
			    MenuStore_Show(playerid, Pizza_Shop, "Airport Pizza Stack");
It also doesn't update the total price at the bottom for me, Or take the money away?
Check this: https://forum.sa-mp.com/showpost.php...1&postcount=23

If this does not work, remove the strpack function

#Edit

I fixed this problem in the repository.
__________________

IP: 35.196.228.74:2009 / Website: www.gtatorcidas.net



CaioTJF is offline   Reply With Quote
Old 01/02/2019, 08:24 PM   #27
TheLeech
Big Clucker
 
Join Date: Aug 2015
Location: Under your bed
Posts: 134
Reputation: 5
Default Re: MenuStore (Build dynamic stores with TextDraws)

Quote:
Originally Posted by CaioTJF View Post
Check this: https://forum.sa-mp.com/showpost.php...1&postcount=23

If this does not work, remove the strpack function

#Edit

I fixed this problem in the repository.
Thanks, I'm having a new issue. I've used this because I like the style of menu for vehicle renting and maybe even vehicle buying but upon renting a vehicle it creates 2 vehicles not 1 and I've tried to place if(amount > 1) return 1; to stop it. This is current code.

PHP Code:
Store:RentVehicle(playeridresponseitemidmodelidpriceamountitemname[])
{
    if(!
response)
    {
        
SetPVarInt(playerid,"shopping"0);
        return 
true;
    }

    if(
GetPlayerMoneyEx(playerid) < price)
    {
        
SendClientMessage(playeridCOLOR_ORANGE"Error: You don't have enough money.");
        
SetPVarInt(playerid,"shopping"0);
        return 
true;
    }
        
    new 
vehstring[256];
    new 
sendername[MAX_PLAYER_NAME];
    for(new 
car 0car MAX_VEHICLEScar++)
    {
        if(
rcarInfo[car][Created] == 1)
        {
            if(
strcmp(rcarInfo[car][Owner], sendernametrue) == 0)
            {
                
SendClientMessage(playeridCOLOR_ORANGE"Server: You already rent a car, please use /unrentcar unrent it.");
                
GivePlayerMoneyEx(playerid500);
                return 
1;
            }
        }
    }
    
GetPlayerName(playeridsendernamesizeof(sendername));
    
veh CreateVehicle(modelid1644.9814, -2322.520013.042089.7556000);
    
SetVehicleVirtualWorldveh GetPlayerVirtualWorld(playerid)); // this does NOT return vehicle id.
    
LinkVehicleToInterior(vehGetPlayerInterior(playerid)); // I added this to be be on the safe side.
    
rcarInfo[veh][Created] = 1;
    
//VehicleInfo[veh][vType] = 3;
    
strmid(rcarInfo[veh][Owner], sendername0strlen(sendername), 255);
    
PutPlayerInVehicle(playeridveh0);
    
VehicleInfo[veh][vWindows] = 0;
    
VehicleInfo[veh][vLocked] = 0;
    
    
RemovePlayerMoneyEx(playeridprice);
    
format(string128"You have rented a %s, You will be charged every hour $%i. (Only when online)"itemnameprice);
    
SendClientMessage(playeridCOLOR_ORANGEstring);
    
SendClientMessage(playeridCOLOR_ORANGE"The car will stay until you finish renting it, use /unrentcar to despawn it");
    
SetPVarInt(playerid,"shopping"0);
    return 
true;

__________________
The sa-mp server 2Real Roleplay is being re-made from the ground up, Join in on development progress and request features on the discord channel. https://discord.gg/CXnvhSf
TheLeech is offline   Reply With Quote
Old 02/02/2019, 09:13 AM   #28
JeSuisUnChat
Little Clucker
 
JeSuisUnChat's Avatar
 
Join Date: Jun 2014
Posts: 39
Reputation: 0
Default Re: MenuStore (Build dynamic stores with TextDraws)

Wow, a good work.

We can't use %s, %d, in MenuStore_AddItem ?
JeSuisUnChat is offline   Reply With Quote
Old 02/02/2019, 11:53 AM   #29
Saddin
Huge Clucker
 
Saddin's Avatar
 
Join Date: Mar 2011
Posts: 376
Reputation: 35
Default Re: MenuStore (Build dynamic stores with TextDraws)

It's nice UI, really useful!
Saddin is offline   Reply With Quote
Old 07/02/2019, 04:42 AM   #30
Vallenci
Little Clucker
 
Join Date: Aug 2015
Posts: 1
Reputation: 0
Default Re: MenuStore (Build dynamic stores with TextDraws)

I can't click textdraw, why?
ver 4.2
Vallenci 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
[Include] MenuStore (Crie lojas utilizando TextDraws) CaioTJF Lançamentos/Releases 57 01/05/2018 07:57 PM
Dynamic Textdraws. MartiQ Scripting Help 0 27/01/2014 08:43 PM
Dynamic textdraws Face9000 Scripting Help 4 17/01/2014 02:00 PM
[FilterScript] [0.3e]Niko_boy"s Vehicle Spawner Based on TextDraws [Build 1.1] Niko_boy Filterscripts 22 21/11/2012 03:47 PM
[Include] e_steam - Dynamic Streamer + Fast (2x) - Build 1 BlueFire_ Includes 16 17/10/2012 02:50 PM


All times are GMT. The time now is 03:17 AM.


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