[Include] drift-detection.inc - drifting gamemodes or minigames with ease!
#1

drift-detection.inc: v1.0.1
This include provide basic drift detection functionality that can be used in any drift script, it doesn't require a plugin, just plug and start using it. It's aimed to be basic to avoid performance issues since it's written in PAWN. I have noticed that the drift plugin was removed from the forum (and it didn't work with newer SA-MP versions) so I decided to rewrite this include I've created a while ago and release it. I am willing to continue developing this include if it gains interest, so don't hesitate to suggest a feature or report a bug!

Preview:
Documentation:

Functions:

PHP код:
Drift::EnableDetection(playerid = -1);
Drift::EnableDamageCheck(playerid = -1);
Drift::DisableDetection(playerid = -1);
Drift::DisableDamageCheck(playerid = -1);
boolDrift::IsDetectionEnabled(playerid = -1);
boolDrift::IsDamageCheckEnabled(playerid = -1);
boolDrift::IsPlayerDrifting(playerid);
Drift::SetMinAngle(Floatangle);
Drift::SetMinSpeed(Floatspeed);
Drift::SetTimeoutTicks(ticks);
FloatDrift::GetMinAngle();
FloatDrift::GetMinSpeed();
Drift::GetTimeoutTicks(); 
Callbacks:

PHP код:
forward OnPlayerDriftStart(playerid);
forward OnPlayerDriftUpdate(playeridFloatdrift_angleFloatspeed);
forward OnPlayerDriftEnd(playeridreasonFloatdistancetime); 
End reasons:
  • DRIFT_END_REASON_DAMAGED: vehicle is damaged (only when DamageCheck is enabled)
  • DRIFT_END_REASON_TIMEOUT: player has stopped drifting for N * delay interval.
  • DRIFT_END_REASON_OTHER: player left his vehicle or disconencted from the server.
Installation:

sampctl:

Код:
sampctl package install ltkarim/drift-detection
GitHub:

https://github.com/ltkarim/drift-detection
Reply


Messages In This Thread
drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 14:08
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by rfr - 15.02.2018, 14:13
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 14:19
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 14:22
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 14:23
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 14:30
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 14:41
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 14:47
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 14:48
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 14:52
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 14:59
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 15:04
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 15:22
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 15:38
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 15:40
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 15:42
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 15:45
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 16.02.2018, 08:55
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 16.02.2018, 08:58
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 16.02.2018, 09:06

Forum Jump:


Users browsing this thread: 2 Guest(s)