Bibliothèque★ 5mis à jour avr. 2019MITPawnsampctl
Ouvrir sur GitHubInstaller avec sampctl
sampctl package install pawno-labs/samp-vehicle-components-library
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 1 paquet
- sampctl/samp-stdlibpas dans cet annuaire
README.md
Vehicle Components Library
This library add a new functions, which help find compatible upgrades.
Installation
Simply install to your project:
sampctl package install pawno-labs/samp-vehicle-components-library
Include in your code and begin using the library:
#include <components>
Usage
public OnVehicleMod(playerid, vehicleid, componentid)
{
new modelid = GetVehicleModel(vehicleid);
if (IsVehicleUpgradeCompatible(modelid, componentid))
{
new
name[64],
string[144];
GetVehicleComponentName(componentid, name, sizeof(name));
format(string, sizeof(string), "You have successfully installed \"%s\"", name);
SendClientMessage(playerid, -1, string);
}
return 1;
}
Testing
To test, simply run the package:
sampctl package run
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