AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to make the shop menu transparent (https://forums.alliedmods.net/showthread.php?t=223994)

caked 08-19-2013 04:36

How to make the shop menu transparent
 
How do you make the shop menu transparent for e.g if u dont have enough money it is transparent. Another e.g

Shop Menu:

Shield
Boots of Speed
Gravity

if you dont have enough money it is transparent

Kia 08-19-2013 04:37

Re: How to make the shop menu transparent
 
At the menu item :

PHP Code:

menu_additem(menu"Name of Item""1"cs_get_user_money(id) >= get_pcvar_num(cvar_item_cost) ? 1<<31


caked 08-19-2013 04:43

Re: How to make the shop menu transparent
 
What do i have 2 include?

Kia 08-19-2013 05:04

Re: How to make the shop menu transparent
 
Nothing. You just make an normal menu and add

PHP Code:

cs_get_user_money(id) >= get_pcvar_num(YOUR_CVAR_HERE) ? 1<<31

after the const info[] = ""

caked 08-20-2013 03:19

Re: How to make the shop menu transparent
 
It is giving me an error saying undefined symbol "cvar_item_cost"

new menu = menu_create("\rShop Menu:", "cmdShop_handler");

menu_additem(menu, "Name of Item", "1", cs_get_user_money(id) >= get_pcvar_num(cvar_item_cost) ? 0 : 1<<31);
menu_additem(menu, "\wFlash Grenade", "2", 0);
menu_additem(menu, "\wSmoke Grenade", "3", 0);
menu_additem(menu, "\wShield", "4", 0);
menu_additem(menu, "\wSpeed", "5", 0);
menu_additem(menu, "\wGravity", "6", 0);

lobopack23 08-20-2013 03:25

Re: How to make the shop menu transparent
 
he is giving you an example of what you should already have.. if you want a whole plugin..maybe you can just say so -.-

caked 08-20-2013 04:52

Re: How to make the shop menu transparent
 
No just why giving me that error i put it in new menu

Kia 08-20-2013 04:58

Re: How to make the shop menu transparent
 
You need to define cvar_time_cost first.

caked 08-20-2013 06:14

Re: How to make the shop menu transparent
 
Can you make me any random item cost so i can just test it out if it works thx

Kia 08-20-2013 06:43

Re: How to make the shop menu transparent
 
Just define cvar_item_cost and give it any num er.


All times are GMT -4. The time now is 15:54.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.