Closed omershevach closed 4 years ago
Hi,
The general idea is to send server event with player position if he is in the area, validate data on server and use Db.UpdateCash
to give him money.
i already did the cheak of the player location, i just need the trigger to give him money. i have tried this: (is server side)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'inform', text = 'Test!', length = 2500, style = { ['background-color'] = '#ffffff', ['color'] = '#000000' } })
Citizen.Wait(1000)
local player = source
Db.UpdateCash(player, 100)
and i does not work and not giving an error.
im getting the notification but the money stay 0
/server.lua:7: attempt to index a nil value (global 'Db')
You can't access lsv-main
files from other resources.
Los Santos V is a complete game mode, not framework, and if you want to change smth - modify it directly.
Hello i am making a script that gives you cash if you are in a location. my problem is that i dont know what trigger/function gives you money in that gamemode.
i hope to get an answer. Thanks.