Welcome to yet another minor release of mine, this time, the car guys under you will have something to fanboy about for a few hours, because i ““converted”” the drift counter from MTA to FiveM, and while i was doing that, improved it a bit, too.
Basic Information:
car go sideways
player get points
Advanced Information:
You can also give the player money for drifting, which will be handled in the driftcounter_s.lua
in the first few lines you can enable/disable payout, along with change if you want to use the ( native ) V Money System ( used by virtually noone yet ) or use EssentialmemeMode to give your player money, this function is disabled by default ( as people will probably get confused as to why there are 2 money displays all of a sudden ).
Anyway, it’s quite unfinished and total scores dont exist ( yet ), you can write functions to add such tho, as the variable for the player score already exists.
Error loading script driftcounter_s.lua in resource FiveM-DriftCounter-master: driftcounter_s.lua:38: attempt to concatenate a nil value (global ‘updatePath’)
stack traceback:
driftcounter_s.lua:38: in function ‘checkVersionHTTPRequest’
driftcounter_s.lua:40: in main chunk
Failed to load script driftcounter_s.lua.
Started resource FiveM-DriftCounter-master
Added Drift “Stat”, you can access this stat from any script by using _,DriftScore = StatGetInt("MP0_DRIFT_SCORE",-1)
( note this does not save, you’d have to write something yourself, i might make something later with resource kvp, which will transfer the stats between all servers )
Have Fun! I’d love to see what you guys can come up with.
Along with this update the method of configuring the settings has now changed as it now uses convars. To set this up correctly, head over to your cfg and add:
set DriftC_useGlobalScore "true"
set DriftC_usePayout "false"
set DriftC_useFramework "Native"
set DriftC_SaveAtEndOfDrift "true"
set DriftC_SaveTime 60000
All of these values can be modified to your liking (all the definitions of each setting and what it does is in driftcounter_s!)
Now, onto the more significant update, global scores! This feature is an opt-out feature and can be disabled by changing DriftC_useGlobalScore to “false”, however, when true
all score you recieve on one server, will now transfer seamlessly to another server, without the need of any hassle from the user or server owner (NOTE: this will only work with
servers that have it enabled, and it will save depending on their customisation).
Error running system event handling function for resource DriftCounter: citizen: /scripting/lua/scheduler.lua: 41: Failed to execute thread: driftcounter_s.lua: 66: attempt to index a nil value (local ‘data’)
Since I start programming I try to read the code but I have not found where it can come from.
DriftCounter Error: Could not reach the service. Code: 404
Make sure https://services.illusivetea.me/driftcounter-storage is accessable by your server.
To prevent errors, global database will not be available.