Hi ! I am the webmaster of Trackyserver.com, for those who do not know, it is a top ranking website of FiveM servers.
More and more players are voting for their favorite server and I thought a voting reward script might be interesting. The goal is to reward players in the game as soon as they vote for your server.
Since FiveM also works with steam id, this script would be easily adaptable to my voting API that my members already use for games like Ark, Rust, Unturned …
I am looking for someone who masters lua to create a compatible voting script.
Thank you !
EDIT 5/11/2018
The script is available and 100% functional ! A big thank to Havoc for his work !
If you have a suggestion do not hesitate to reply to this topic or contact me on Trackyserver.com
Here is the download link: https://github.com/TGRHavoc/fivem-serverVote
&steamid={UserSteamID}
And what about servers that don’t force Stream (like a normal person)? You’re telling me that I wouldn’t be able to vote for my favourite server just because I don’t have/want Steam?
Nice. I don’t see how this would work with a resource though, afaik you can’t “send” the captcha to the players for them to fill out. You might be able to do this but, I feel it would take a lot of effort without any real benefit. And, if you’re using a simple text-generated captcha then, you’ve missed the point of having a captcha in the first place.
And how would you stop this being abused? On FiveM anyone can change their username to anything. So, what’s to stop me from changing my name to “NotHavoc” and claiming a reward for “NotHavoc” as well as “Havoc”?
On that note, if I know 200 steamIDs, what’s to stop me from sending requests as them to vote from my server every day? Do you have a system in place for this? If yes, and it has something to do with IP checking, then I have to doubt whether this would work on this platform. You can’t send a request from the client (because of security reasons) so, all requests would be coming from the server. One IP so, an IP rate-limiter wouldn’t wok.
I get what you’re trying to do and, think it could be a cool idea. I just don’t see how this could be done without abuse from people (in particular, server owners) and with ease of use for the players.
I honestly think it’s a great idea, I am building my own server right now still far away from finishing but I will definitely implement a API however I have to do it in c# since I don’t know lua.
I mean it will be possible to vote without steam authentication.
But to receive the reward in game, the player must obligatorily connect with steam.
On most FiveM servers it is possible to recover the player’s steamid.
&username={Username} is enough for other games, not for FiveM.
I share @Havoc 's concern that this could easily be abused by a server admin that wants their server to have the most votes. What prevents an admin from sending hundreds or thousands of POST requests to your API and simply iterate the steamID or pull every steamID from their DB? Is there any sort of rate limit, or IP tracking, etc etc?
Respect the syntax of the script, pay attention to the commas.
Commands must be executable by the console. Otherwise, you will get errors.
Everything in “@” will run every vote.
Everything in “30” will execute when the player has voted 30 times.
A file votes.json will be created when you start to use the plugin, it is this file which counts the number of vote of each player. Delete it if you want to reset the counters.
Hi SaltyGrandpa, this is not the query that adds the vote, this API is used only to check if a player has voted and whether he has already received his reward.
To vote, the player must necessarily identify via steam on Trackyserver.com. Once the player has voted, his steamid is recorded in our database.
Well, thanks for attention…
I understood how to add the values, but not the command, I put exactly as it is here in config.lua and the player still does not receive anything for voting =/
If you receive the message “alicersg has voted!” it’s that the script works.
On the other hand the command “moneyadd” is given as an example, you must install essential and this command must be executable from the console of the server, you must certainly create it.
Before adding the commands in config.lua, test them from the server console.
In my opinion this command does not exist on your server.
Added the script and set the convars in the server.cfg and it said they are missing, so i did it in the server.lua and it still said it was missing. Any idea on what im doing wrong here?