SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 14/06/2018, 11:11 PM   #1
MBJ
Huge Clucker
 
Join Date: Jul 2016
Posts: 205
Reputation: 68
Default VCF - Vehicle Component Functions

Introduction

This include was made in order to facilitate the manipulation of the state of the vehicle components in the use of the GetVehicleDamageStatus, because the function uses bits to manipulate the states and as this is not a well-known subject in Pawn, I decided to develop this include to do the "heavy" work

BUGS

The include is still in a BETA version and may contain bugs, in the tests that I did, there were none, but there may be some that I have not seen in the tests, if any, et me know as soon as possible to update.

Functions

Include now has the following functions:
PHP Code:
// Check this light is on or off
IsLightEnabled(vehicleidLight:lightLightSide:lightSide)

// Changes the light status
AlterLightState(vehicleidLight:lightLightSide:lightSide)

// Get the current state of one of the vehicle doors
// Note: Hood and trunk are considered doors in SA-MP
GetDoorState(vehicleidDoor:door)

// Changes the state of one of the vehicle doors
SetDoorState(vehicleidDoor:doordoorState)

// Get the X, Y, and Z rotation of the vehicle
GetVehicleRotation(vehicleid, &Float:rx, &Float:ry, &Float:rz)

// Check that the tire is inflated
IsTireEnabled(vehicleidTire:tire)

// Change tire condition
AlterTireState(vehicleidTire:tire
Credits

RazorGuigo by function GetVehicleRotation

Download

GitHub
__________________


MBJ is offline   Reply With Quote
Old 14/06/2018, 11:20 PM   #2
cuber
Gangsta
 
cuber's Avatar
 
Join Date: Oct 2016
Location: KS.
Posts: 780
Reputation: 134
Default Re: VCF - Vehicle Component Functions

Useful, but why did you upload an amx file in GitHub?
cuber is offline   Reply With Quote
Old 14/06/2018, 11:26 PM   #3
MBJ
Huge Clucker
 
Join Date: Jul 2016
Posts: 205
Reputation: 68
Default Re: VCF - Vehicle Component Functions

an FS showing the operation of include, for who wants to see it working without having to develop a system just to see what she does

/car [ modelid ] - create a vehicle
/door [ vehicleid ] - command to fix doors
/light [ vehicleid ] - command to change the state of the lights
Note: The lights only works if the game time is at night
__________________


MBJ is offline   Reply With Quote
Old 15/06/2018, 02:59 AM   #4
Pottus
Godfather
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 5,417
Reputation: 1227
Default Re: VCF - Vehicle Component Functions

Just going to point out it doesn't make sense to use "Alter" instead of "Set" that is rather confusing.
Pottus is offline   Reply With Quote
Old 15/06/2018, 11:27 AM   #5
Sasino97
High-roller
 
Sasino97's Avatar
 
Join Date: Dec 2010
Location: Italia
Posts: 1,393
Reputation: 88
Default Re: VCF - Vehicle Component Functions

Quote:
Originally Posted by Pottus View Post
Just going to point out it doesn't make sense to use "Alter" instead of "Set" that is rather confusing.
Exactly.
__________________
Sasino97 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] VCF - Vehicle Component Functions MBJ Lançamentos/Releases 9 24/06/2018 09:32 PM
Camera Pos for each vehicle component Chipardeur Scripting Help 2 01/03/2016 05:21 PM
Vehicle Component devil shill Scripting Help 1 08/08/2014 08:49 PM
Vehicle Component help. RayPoda Help Archive 6 22/06/2009 08:56 AM
Vehicle Component Prices Norn Help Archive 7 01/04/2009 12:37 PM


All times are GMT. The time now is 01:41 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.