samp.directory
← Scripts et bibliothèques

ScavengeSurvive/velocity

Simply provides a function to get the player's velocity (or their vehicle) in kilometres per hour.

Bibliothèque★ 1mis à jour janv. 2018MITPAWNsampctl
Ouvrir sur GitHub

Installer avec sampctl

sampctl package install ScavengeSurvive/velocity

Lance ceci dans le dossier de ton projet. sampctl télécharge le paquet et ce dont il dépend.

L’essayer dans le compilateur Pawn →

Ajoute ses fichiers include, avec les bibliothèques dont il dépend, au compilateur Pawn de ton navigateur, prêts à être inclus dans un script.

Dépend de 2 paquets

Utilisé par 1 paquet

README.md

velocity.inc

This package simply provides one function: GetPlayerTotalVelocity which returns the players velocity in kilometres per hour.

The exact formula for this has quite a lot of history and debate centered around it in the SA:MP community. There is a discussion on the topic here.

Despite the many different methods people have come up with over the years, this library currently just employs a very simple multiplier of the vector of the player's velocity.

Installation

Simply install to your project:

sampctl package install ScavengeSurvive/velocity

Include in your code and begin using the library:

#include <velocity>

Testing

To test, simply run the package:

sampctl package run

And connect to localhost:7777.

Cette page est construite à partir de ce que GitHub publie sur le dépôt. samp.directory n’héberge pas le code. Signaler un problème avec cette fiche

ScavengeSurvive/velocity : Bibliothèque SA-MP | samp.directory