MTA Resource | Multi Theft Auto Community
On our website you can download MTA SA and various resources for the MTA server.

Drift Mode

Features:
* Points for drift
* The greater drift angle and speed the greater score
* Drift meter drawn at the bottom of the screen (can be shown/hidden with /showdriftmeter <true/false>)
* Combo for drift when you stop drift and start drift again within 2 seconds - change direction of drift is also a combo
* 7 segments digit font included
* Custom events for other resources to make use of this resource (have a look in c_drift.lua which creates all the UI elements (excluding drift meter) with pure use of events)
* Command to show/hide the drift meter: /showdriftmeter <true/false>

- onClientVehicleStartDrift - triggered when client starts to drift
- onClientVehicleDrift - triggered during drift (this is where you want to give player points for drift - look in c_drift.lua to see how I calculate points)
- onClientVehicleDriftCombo - triggered when player gets combo (drift direction change, quits drift and starts drift again within 2 seconds)
- onClientVehicleEndDrift - triggered when client stops to drift (you can use this event to send player's score to the server and send a message to everyone telling player's drift score or display best server's drifters or whatever you like to do with their score)

If you don't want players to see best score, score during drift, drift combo then remove c_drift.lua script from meta.xml. This file is responsible for all the drift features. You can use the events to make your own custom drift UI. c_drift.lua is there to show you how to use the custom events.
Tags: #drift

Category: Scripts
Author: 50p
Added: HIMARS
Published: 18.07.2012 00:00

Comments