Liking the mod, but not sure where to put in the code to add money to the player. I have tested it and it does say you received reward but didnt get the money. Any help would be greatful.
The moneyadd command does not exist on your server.
The moneyadd command is used as an example, it depends on your server, which plugin you useâŚ
Commands must be executable by the console. Otherwise, you will get errors.
As a note, if you get 404 responses, change the URLs listed in the Server file to be secure, so https not http.
[âstatusâ] = âhttps://api.trackyserver.com/vote/?action=status&key=%s&steamid=%sâ,
[âclaimâ] = âhttps://api.trackyserver.com/vote/?action=claim&key=%s&steamid=%sâ
This mod would be perfect if it included some examples of addmoney with the different overrides for admin levels such as the most frequently used es_admin2. This will turn alot of people away without something, I can appreciate there are many mods out there, but with most server admins not having a software background this will just confuse them.
Ozzie
Iâm using this and the âsayâ command works, but iâve added a command to add money that doesnât work. It say âno such commandâ, but when i type it in the console by hand it does work? How is this possible
I think this is a good script except, the command âaddmoneyâ doesnât work. Iâve changed it to âsetmoneyâ, âgiveaccountmoneyâ but since it only accepts normal CFX commands this wonât work. How to fix such a thing?
Have you figured it out? Iâm curious to see how this works because with ESX I cant get it to work.
Config.Rewards = {
["@"] = { â @ = all votes
âxPlayer.addAccountMoney(account, 20000)â, â add 20000 money for voting
âsay {playername} has voted!â
},
Thatâs what I thought would work and it doesnât. Also no way to test after you have done it once
For ESX-
Server.lua
Add up top line 1.
ESX = nil
TriggerEvent(âesx:getSharedObjectâ, function(obj) ESX = obj end)
Where it says âRegisterCommand(âcheckvoteâ, function(src, args, raw)â add
local _source = source --maybe redundant but its working
local xPlayer = ESX.GetPlayerFromId(_source)
Where it says "elseif(responseText == â1â) add
xPlayer.addAccountMoney(âbankâ, 500) â Can be changed to whatever
TriggerClientEvent(âesx:showNotificationâ, _source, âYou have recieved $500 for votingâ) --Just notifies the person
Hope this helps
I think it doesnt work.
where can I get the ServerKery