[VORP]
Life Style
A LifeStyle Script for RedM VORP. Allows players to have personalised starter items, spawn locations and servers to integrate what a player can do based on their role in society.
Script Features
- Menu to select life styles.
- Section to add starter items and money.
- Uses state bags to efficiently store data.
- Personalised spawn location based on role.
Documentation
Download Here
Github
Ez Combat Logging
Ez HUD & Metabolism
Ez Fast Travel
Ez Society Creator (with boss menu) and Multi Job
Ez Radial Menu
and more to come…
3 Likes
Thanks for free release! Novadays there are not too much of it we can see on forums, and yours actually implements good idea and made with stylish UI!
Could it be possible to add 1 little change into the code, to make code more secured? Something like before giving lifestyle, add checking if player not yet acquired starting lifestyle.
RegisterServerEvent('ez_lifeStyle:chooseStyle', function(id)
local src = source
local uniqueId = Config.GetUniqueIdentifierForCharacter(src)
-- Here, like 'SELECT lifesyte FROM characters WHERE charidentifier = @identifier' ... etc.
-- if lifestyle then return end
-- OR like this:
-- if Player(src).state.lifeStyle ~= nil then
-- return
-- end
Player(source).state.lifeStyle = id
MySQL.Sync.execute("UPDATE characters SET lifestyle = @lifeStyle WHERE charidentifier = @identifier", {
['@identifier'] = uniqueId,
['@lifeStyle'] = id
})
SetTimeout(Config.GiveStarterItemsDelay, function()
Config.GiveStarterItems(src, id)
end)
end)
The point is to secure the event handler from exploits like this, when cheaters may execute code many times and get starting items without limits:
TriggerServerEvent('ez_lifeStyle:chooseStyle', id)
Many thanks ahead and thanks for the great release! 
1 Like
Thank you for your suggestion. I appreciate your feedback. Currently in progress making changes to it.
I will notify again once complete.
+ Adding option to stop starter items available more than once (stop the exploit)
+ Adding option to only allow to set life style once, no more.
- Removing default value from attribute lifestyle in database. The default value was "civilian", now null. Make sure to update it upon new release!
2 Likes
Update Complete. No more exploiting event. 
Make sure to set the lifestyle attribute in database default value to null from “civilian”. Very important!!!
2 Likes
Awesome work, that’s a cool way to put a new spin on things for people to add to their servers.
1 Like
I tried adding more to it but it then looks all weird and uncenterd/text doesn’t fit,etc.
Any way to make it easier to add more?
Maybe another row below them in case of needing more to add?
1 Like
In the css for the resource, find the following styling for id “styles”.
Update the max-width to something bigger, or set to 100%…
e.g.
This will allow you to use the fullwidth and add extra styles.
I hope this information helps ^^^
3 Likes
nice work. could you make it compatible with RSG Core? :3