samp.directory
← Betikler ve kütüphaneler

karimoldacc/drift-detection

A drift include for SA-MP servers.

Kütüphane★ 5Şub 2018 güncellendiLisans yokPAWNsampctl
GitHub’da aç

Bu deponun lisans dosyası yok. Okumak için herkese açık, ama bu tek başına yeniden kullanma izni vermez.

sampctl ile kur

sampctl package install karimoldacc/drift-detection

Bunu proje klasöründe çalıştır. sampctl paketi ve bağımlı olduklarını indirir.

1 pakete bağımlı

README.md

drift-detection.inc

This package provides basic drift detection functionality that can be used in drift gamemodes or minigames, it is aimed be basic to avoid affecting the servers performance.

Video preview: https://gfycat.com/gifs/detail/ReflectingSeveralArizonaalligatorlizard

Installation

Simply install to your project:

sampctl package install ltkarim/drift-detection

Include in your code and begin using the library:

#include <drift-detection>

Usage

Functions

Drift::EnableDetection(playerid = -1);
Drift::EnableDamageCheck(playerid = -1);

Drift::DisableDetection(playerid = -1);
Drift::DisableDamageCheck(playerid = -1);

bool: Drift::IsDetectionEnabled(playerid = -1);
bool: Drift::IsDamageCheckEnabled(playerid = -1);
bool: Drift::IsPlayerDrifting(playerid);

Callbacks

forward	OnPlayerDriftStart(playerid);
forward	OnPlayerDriftUpdate(playerid, Float: drift_angle, Float: speed);
forward	OnPlayerDriftEnd(playerid, reason, Float: distance, time);

Drift End Reasons

  • 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.
  • DRIFT_END_REASON_DAMAGED: vehicle is damaged (only when DamageCheck is enabled)

Testing

To test, simply run the package:

sampctl package run

And connect to localhost:7777 to test.

Bu sayfa GitHub’ın depo hakkında yayımladıklarından oluşturulur. samp.directory kodu barındırmaz. Bu ilanla ilgili bir sorun bildir