Player Shop
Get ready to spend some time, but this works great.
Basics. You have to write a menu, followed by the commands to use it. Here is mine:
--------
ALL ITEMS ARE IN PLAYER PUBLIC CHAT
I am only going to display the SHOP AMMO because they all mimic the same idea....
HOW TO MAKE IT WORK: Use EQUALS:
This makes them type exactly what they need. Otherwise, the shop will show every time if STARTSWITH: !shop (whatever).
We dont want STARTSWITH. We want exact - so EQUALS is better.
--------
Shop Menu
EQUALS:!shop
sayplayer {player_steamid} "[00FFFF] Shop Menu. Type !shop ammo (active), !shop deco(TBD), !shop food(active), !shop weapon(TBD), !shop extras(TBD)."
---------
Shop Ammo
EQUALS:!shop ammo
sayplayer {player_steamid} "[00FFFF] Type !shop ammo #. All items are in 50 increments."
sayplayer {player_steamid} "[00FFFF] 1 - 9mm Ammo $950"
sayplayer {player_steamid} "[00FFFF] 2 - .44 Magnum Ammo $1,500 "
sayplayer {player_steamid} "[00FFFF] 3 - 7.62mm Ammo $1,650"
sayplayer {player_steamid} "[00FFFF] 4 - Shotgun Ammo $1,650"
----------
Shop Ammo 9mm
EQUALS:!shop ammo 1||HASFUNDS:{player_steamid},950
.BANKWITHDRAW:{player_steamid},950
bc-give {player_steamid} ammo9mmBullet /c=50
sayplayer {player_steamid} "[00FFFF] Purchased (50) 9mm Bullets!"
sayplayer {player_steamid} "[00FFFF] Your new balance is {bank_balance}"
----------
Shop Ammo 44 Magnum
EQUALS:!shop ammo 2||HASFUNDS:{player_steamid},1500
.BANKWITHDRAW:{player_steamid},1500
bc-give {player_steamid} ammo44MagnumBullet /c=50
sayplayer {player_steamid} "[00FFFF] Purchased (50) 44 Magnum Bullets!"
sayplayer {player_steamid} "[00FFFF] Your new balance is {bank_balance}"
----------
Shop Ammo 7.62mm
EQUALS:!shop ammo 3||HASFUNDS:{player_steamid},1650
.BANKWITHDRAW:{player_steamid},1650
bc-give {player_steamid} ammo762mmBulletFMJ /c=50
sayplayer {player_steamid} "[00FFFF] Purchased (50) 7.62mm Bullets!"
sayplayer {player_steamid} "[00FFFF] Your new balance is {bank_balance}"
----------
Shop Ammo Shotgun Shells
EQUALS:!shop ammo 4||HASFUNDS:{player_steamid},1650
.BANKWITHDRAW:{player_steamid},1650
bc-give {player_steamid} ammoShotgunShell /c=50
sayplayer {player_steamid} "[00FFFF] Purchased (50) Shotgun Shells!"
sayplayer {player_steamid} "[00FFFF] Your new balance is {bank_balance}"