Library★ 5updated Apr 2019MITPawnsampctl
Open on GitHubInstall with sampctl
sampctl package install pawno-labs/samp-vehicle-components-library
Run this in your project folder. sampctl downloads the package and what it depends on.
Try it in the Pawn compiler →
Adds its include files, with the libraries it depends on, to the Pawn compiler in your browser, ready to include in a script.
Depends on 1 package
- sampctl/samp-stdlibnot in this directory
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
This page is built from what GitHub publishes about the repository. samp.directory does not host the code. Report a problem with this listing