08.05.2010, 08:29
This is a neat filterscript of mine for rewarding drifts in accordance to their traveling speed and slip angle. It uses non-conventional(due to SAMP's defaults) trigonometric functions to calculate the slip angle through the player's velocity on OnPlayerUpdate, thus being more accurate than timer-based and GetPlayerPos-based alternatives. Also, your drifting is rewarded with car parts including full mod packages scripted for Elegys and Sultans. Your current drift score, last drift score and record score are also displayed in TextDraws on the right-hand side. I've also included bonuses for drifting at high speeds(Anything higher than 0.6 out of a possible 0.95 for Elegy) and sliding at an optimal angle of 35-45 degrees. Drifts are canceled when you go too slow or damage your car! Also, you can link drifts to increase your maximum score.
The recommended car to use is Elegy, but everything works... as long as you know how to make it go sideways. /drifthelp might also help you.
So - get in a car, enter /drift, and slide your way to victory!
Note: If you are planning to use this on a public server, please re-compile the script with the correct MaximumPlayers amount! Otherwise things probably won't work properly.
I've added comments to some lines that could be removed if you don't like some of the rewards(Score updating, tuning parts).
Feel free to use this FS on your servers, but I'd still like to receive credit.
Update and modification requests are welcome, as well as bug reports and optimization tips!
.pwn : http://pastebin.com/9PJ2M5BM
.amx : http://www.upload.ee/download/560172...EWDrift1.0.amx
Here's a sample picture of the drifting in action
![](/imageshack/img441/1399/driftx.th.jpg)
Also, while this script is fully my creation, I'd like to thank Cyber_Punk for helping me with optimization and scripting-related questions! Thnx mayne :>
The recommended car to use is Elegy, but everything works... as long as you know how to make it go sideways. /drifthelp might also help you.
So - get in a car, enter /drift, and slide your way to victory!
Note: If you are planning to use this on a public server, please re-compile the script with the correct MaximumPlayers amount! Otherwise things probably won't work properly.
I've added comments to some lines that could be removed if you don't like some of the rewards(Score updating, tuning parts).
Feel free to use this FS on your servers, but I'd still like to receive credit.
Update and modification requests are welcome, as well as bug reports and optimization tips!
.pwn : http://pastebin.com/9PJ2M5BM
.amx : http://www.upload.ee/download/560172...EWDrift1.0.amx
Here's a sample picture of the drifting in action
![](/imageshack/img441/1399/driftx.th.jpg)
Also, while this script is fully my creation, I'd like to thank Cyber_Punk for helping me with optimization and scripting-related questions! Thnx mayne :>