What is this?
This is
ShopMod, a lightweight NPC shop system made for RP gamemodes.
Details?
A superadmin creates some shops and adds items to them with console commands. Players can then interact with the NPCs and buy items such as weapons (if your a minge), health packs, and other stuff!
How to set up
ShopMod is made to work with any RP or money system, and due to that it requires some setting up. You must go into shopmod/lua/autorun/server/hooks.lua and edit it so that each function will work with your RP mod. The only part already set up is for CityRP (a friend requested this mod, and he uses CityRP).
Creating shops
To create a shop, stand where and in the direction you want the NPC to spawn. Run the console command:
Code:
shop_create <shop name> <npc model> [<enabled>]
I suggest never setting enabled to anything. Don't know why I put it there in the first place, since there isn't any way to enable something again.
Move away from the spot. The NPC will spawn in 5 seconds.
Adding items to a shop
Look at the shop NPC and run:
The shop's id should print in console.
Then run:
Code:
shop_item_create <shop id> <item name> <entity> <model in shop> <price> <want to use item spawn for this (true/false)>
Done! Go use your NPC! Note that the deletion of items has not been made yet.
Creating Item Spawns
Get the shop's id, stand where you want the spawn to be, and run:
Code:
shop_spawn_create <id>
Deleting shops
Get the shop's id and run:
Deleting items
Open the buy menu for the shop and note the id next to the item name and run:
Code:
shop_item_delete <shop id> <item id>
Notes
-Moving a shop with the physgun will not save its position when the server restarts.
-Shops on different maps are saved seperately.
Download
SVN
Note: The SVN version is the most up to date, but it may also be the most buggy.
SVN Address:
http://svn2.xp-dev.com/svn/rxdaddons/shopmod/
Changelog
Code:
1.5
-Bug fixes (Updated from SVN)
1.4:
-Fixed shop_item_delete
-There is a bug! shop_delete isn't working. I will fix it in the next release.
1.3:
-Added item IDs to the buy menus
-Added shop_item_delete
1.2:
-Bugfixes
1.1:
-Added entity spawn system
-Added shop_spawn_create
1.0:
-Initial Release
I found a bug!
Report it here!
Video