Hello,
This will be my first release here. YEY.
First before you can use this mod, you need Essential Mode. This mod is basicly a modified vehicle shop from here.
(I see in Github that they merged the shops in the es_freeroam folder. Contact me if this can be added.)
So most of the credits will go to the creator to that script.
The mod is now in ENGLISH
What is inside the shop ?
Most of the weapons + some DLC weapons (I removed some DLC weapons but not allâŠ)
Since this is an Essential Mode mod, All the weapons cost some money.
Also the player will stay in the shop as long as he has not reached the maximum. This allows the player to be more efficient in the shop (and spend more money )
You can find all the code here : https://github.com/boermansjo/es_weashop
NEW
Weapons are now stored in the database. When the player spawn ingame, the weapons are giving to the player.
Changelog (13-4-2017)
- [X] Removed the changes needed in player.lua. Mod is now 100% copy/pasteâŠ
- [X] Save all the weapons to the database
- [X] Weapons are given back to the player when he dies or login.
- [X] Getting weapons back from Roberto cost money. The cost is the price of the weapon/100. (Can be changed)
Installation
- Extract the folder and rename it to es_weashop
- Place the folder in your resource folder
- Add - es_weashop to your citmp-server.yml
- Change the mysql connection in sv_weashop.lua
- Run the sql.sql into your database
- Restart your server
- Have fun.
Setup
Changing the limit of weapons :
Open sv_weashop.lua and change the line :
local max_number_weapons = 6
Change the cost of withdrawing the weapons :
Open sv_weashop.lua and change the line :
local cost_ratio = 100
You can add your own blips on the map. If you want to change color of the blip, use this :
SetBlipColour(blipID, color)
If there are any questions or problems, let me know.
Greetings,
Hoegarden31
[details=Summary]
TODO :
- add a preview while in shop (like the vehicle shop). Not included yet, because it is tricky to do.
- Check if player has bought the weapon already. This code is in comment because the native client command doesnât work⊠If some heroâs are here who can fix that I would appreciate.
function DoesPlayerHaveWeapon(model,button,y,selected, source)
local t = false
local hash = GetHashKey(model)
--t = HAS_PED_GOT_WEAPON(source,hash,false) --Check if player already has selected weapon !!!! THIS DOES NOT WORK !!!!!
if t then
drawMenuRight("OWNED",weashop.menu.x,y,selected)
else
drawMenuRight(button.costs.." âŹ",weashop.menu.x,y,selected)
end
end
```[/details]