[Release] Drift Counter

vehicles
drift

#1

it’s motorsport, i swear!

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

image

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.

Download:
Happy being-Sideways!


Probleme with drift counter
#2

Skrrrrrr

(Nice job :D)


#3

Sexy! Very useful for drift servers :stuck_out_tongue:


#4

thanks, very good idea


#5

Biiig Thanks ! awesome drop


#6

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


#7

just committed a fix for that, redownload the new driftcounter_s.lua!


#8

Thank you
problem solved


#9

How can i add a drift scoreboard? like top drifter and things like that?


#10

You would have to add their drift score up each time they finish a drift and then save it somewhere.


#11

this gave me an idea :wink:

Update 1.2

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.


#12

guys, anyone tried to add payment to vrp?


#13

Hey look, an update!

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).

Anyway, have fun drifting!


#14

/dab +1 rep sick as hell


#15

Performance update time!

This small update should improve the speed at which your player info loads in at!

Dont forget to have fun drifting!


#16

Update time again!

This time the global score system has been fixed , and there may be an online scoreboard coming soon too!

Site is now up!:
Drift Leaderboard

Have fun drifting!


#17

I have this error it comes from or

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.

If there would be a charitable soul to help me


#18

How to set up drift to add money to my Mysql database


#19

Hi i became this Error on Serverstart

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.


#20

that should be fine, it just means that drift stats will not be saved for the players.