SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 02/07/2016, 07:22 PM   #1
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,262
Reputation: 323
Cool Extended Vehicle Functions (EVF V3)

Include contains additional functions for vehicles.

New Extended Vehicle Functions (EVF V3)
Simple functions for GetVehicleDamageStatus, UpdateVehicleDamageStatus and more.

PHP Code:
#include <SAM/EVF> 
PHP Code:
/**********************************************************************************************************************************
 *                                                                                                                                *
 *                                              )(   Extended Vehicle Functions   )(                                              *
 *                                                                                                                                *
 * Copyright  2017 Abyss Morgan. All rights reserved.                                                                            *
 * Contributors: Emmet_, Pottus, kvann, Hanger, Freaksken, Gammix, Yashas, Admigo, RIDE2DAY                                       *
 *                                                                                                                                *
 * Download: https://github.com/AbyssMorgan/SA-MP/tree/master/include/SAM                                                         *
 * Publication: http://forum.sa-mp.com/showthread.php?t=611142                                                                    *
 * Website: http://8.ct8.pl                                                                                                       *
 *                                                                                                                                *
 * Plugins: Streamer                                                                                                              *
 * Modules: None                                                                                                                  *
 *                                                                                                                                *
 * File Version: 3.1.1                                                                                                            *
 * SA:MP Version: 0.3.7 (REQUIRE)                                                                                                 *
 * Streamer Version: 2.9.1                                                                                                        *
 *                                                                                                                                *
 * Functions:                                                                                                                     *
 * bool:IsValidVehicleModelID(modelid);                                                                                           *
 * GetVehiclePanels(vehicleid,&front_left,&front_right,&rear_left,&rear_right,&windshield,&front_bumper,&rear_bumper);            *
 * SetVehiclePanels(vehicleid,front_left,front_right,rear_left,rear_right,windshield,front_bumper,rear_bumper);                   *
 * GetVehicleLights(vehicleid,&front_left_light,&front_right_light,&back_lights);                                                 *
 * SetVehicleLights(vehicleid,front_left_light,front_right_light,back_lights);                                                    *
 * GetVehicleDoors(vehicleid,&bonnet,&boot,&driver_door,&passenger_door);                                                         *
 * SetVehicleDoors(vehicleid,bonnet,boot,driver_door,passenger_door);                                                             *
 * GetVehicleTires(vehicleid,&front_left,&front_right,&rear_left,&rear_right);                                                    *
 * SetVehicleTires(vehicleid,front_left,front_right,rear_left,rear_right);                                                        *
 * GetVehicleWindowState(vehicleid,doorid);                                                                                       *
 * SetVehicleWindowState(vehicleid,doorid,window_state);                                                                          *
 * GetVehicleDoorState(vehicleid,doorid);                                                                                         *
 * SetVehicleDoorState(vehicleid,doorid,door_state);                                                                              *
 * bool:IsValidVehicleDoor(vehicleid,doorid);                                                                                     *
 * GetVehicleModelDoorAmount(modelid);                                                                                            *
 * GetVehicleDoorAmount(vehicleid);                                                                                               *
 * SwitchVehicleEngine(vehicleid,bool:engine_status);                                                                             *
 * SwitchVehicleLight(vehicleid,bool:light_status);                                                                               *
 * SwitchVehicleAlarm(vehicleid,bool:alarm_status);                                                                               *
 * SwitchVehicleDoors(vehicleid,bool:doors_status);                                                                               *
 * SwitchVehicleBonnet(vehicleid,bool:bonnet_status);                                                                             *
 * SwitchVehicleBoot(vehicleid,bool:boot_status);                                                                                 *
 * SwitchVehicleObjective(vehicleid,bool:objective_status);                                                                       *
 * GetVehicleParams(vehicleid,type);                                                                                              *
 * SetVehicleParams(vehicleid,type,status,delay = 0);                                                                             *
 * GetVehicleRandomColors(modelid,&color1,&color2);                                                                               *
 * GetNearestVehicle(vehicleid);                                                                                                  *
 * GetVehicleDriver(vehicleid);                                                                                                   *
 * Float:GetVehicleModelTopSpeed(modelid);                                                                                        *
 * Float:GetVehicleTopSpeed(vehicleid);                                                                                           *
 * SetVehicleInterior(vehicleid,interiorid);                                                                                      *
 * GetVehicleSeats(vehicleid);                                                                                                    *
 * GetVehicleModelSeats(modelid);                                                                                                 *
 * IsVehicleSeatOccupied(vehicleid,seatid);                                                                                       *
 * IsValidVehicle(vehicleid);                                                                                                     *
 * RemoveVehiclePaintjob(vehicleid);                                                                                              *
 * SetVehicleHorn(vehicleid,soundid);                                                                                             *
 * GetVehicleHorn(vehicleid);                                                                                                     *
 * RestoreVehicleHorn(vehicleid);                                                                                                 *
 * GetVehicleBomb(vehicleid);                                                                                                     *
 * IsVehicleBombed(vehicleid);                                                                                                    *
 * RemoveVehicleBomb(vehicleid);                                                                                                  *
 * SetVehicleBomb(vehicleid,time = 1000);                                                                                         *
 * IsVehicleBombActivated(vehicleid);                                                                                             *
 * Float:EVF::GetVehicleSpeed(vehicleid);                                                                                         *
 * SetVehicleSpeedCap(vehicleid,Float:maxspeed);                                                                                  *
 * Float:GetVehicleSpeedCap(vehicleid);                                                                                           *
 * DisableVehicleSpeedCap(vehicleid);                                                                                             *
 * SetVehicleFuel(vehicleid,fuel);                                                                                                *
 * GetVehicleFuel(vehicleid);                                                                                                     *
 * ToggleVehicleFuel(vehicleid,bool:toggle);                                                                                      *
 * IsVehicleFuelToggled(vehicleid);                                                                                               *
 * ToggleVehicleSticky(vehicleid,bool:toggle);                                                                                    *
 * IsVehicleSticky(vehicleid);                                                                                                    *
 * ToggleUnoccupiedVehicleDamage(vehicleid,bool:toggle);                                                                          *
 * IsUnoccupiedDamageToggled(vehicleid);                                                                                          *
 * ToggleVehiclePetrolCapDestroy(vehicleid,bool:toggle);                                                                          *
 * IsPetrolCapDestroyToggled(vehicleid);                                                                                          *
 * IsVehicleDamageToggled(vehicleid,type);                                                                                        *
 * ToggleVehicleDamageUpdate(vehicleid,type,toggle);                                                                              *
 * GetVehicleNextSeat(vehicleid,passenger = 1);                                                                                   *
 * TeleportVehicle(vehicleid,Float:x,Float:y,Float:z,Float:angle,worldid = -1,interiorid = -1);                                   *
 * GetVehicleSlotAttachedObject(vehicleid,slot);                                                                                  *
 * IsObjectAttachedToVehicle(objectid,vehicleid);                                                                                 *
 * EVF::UpdateVehicleDamage(vehicleid,type);                                                                                      *
 * EVF::UpdateVehicleDamageStatus(vehicleid,type,update);                                                                         *
 * EVF::GetVehicleDamageStatus(vehicleid,type);                                                                                   *
 * SetVehicleNeonLights(vehicleid,bool:enable = true,color = RED_NEON);                                                           *
 * VehicleSupportsNeonLights(modelid);                                                                                            *
 * GetVehicleNeonLightsState(vehicleid);                                                                                          *
 * IsToggledVehicleBulletproof(vehicleid);                                                                                        *
 * ToggleVehicleBulletproof(vehicleid,bool:toggle);                                                                               *
 * GetComponentName(componentid,name[],len = sizeof(name));                                                                       *
 * EVF::IsPlayerInModShop(playerid);                                                                                              *
 * IsValidComponentForVehicle(vehicleid,componentid);                                                                             *
 * GetVehicleComponentPrice(componentid);                                                                                         *
 *                                                                                                                                *
 * Remote functions:                                                                                                              *
 * EVF_ImportVehicle(vehicleid,modelid,Float:x,Float:y,Float:z,Float:angle,color1,color2,worldid,interiorid,unoccupied_damage);   *
 * EVF_RemoveVehicle(vehicleid);                                                                                                  *
 *                                                                                                                                *
 * Compatible with YSF Functions:                                                                                                 *
 * GetVehicleColor(vehicleid,&color1,&color2);                                                                                    *
 * GetVehiclePaintjob(vehicleid);                                                                                                 *
 * GetVehicleInterior(vehicleid);                                                                                                 *
 * EVF::GetVehicleSpawnInfo(vehicleid,&Float:x,&Float:y,&Float:z,&Float:rotation,&worldid,&interiorid);                           *
 * EVF::SetVehicleSpawnInfo(vehicleid,Float:x,Float:y,Float:z,Float:rotation,worldid,interiorid);                                 *
 * IsVehicleOccupied(vehicleid);                                                                                                  *
 *                                                                                                                                *
 * Callbacks:                                                                                                                     *
 * OnVehicleCreated(vehicleid);                       //Called when a vehicle is created.                                         *
 * OnVehicleDestroyed(vehicleid);                     //Called when a vehicle is deleted.                                         *
 * OnTrailerHooked(playerid,vehicleid,trailerid);     //Called when a trailer is hooked.                                          *
 * OnTrailerUnhooked(playerid,vehicleid,trailerid);   //Called when a trailer is unhooked.                                        *
 * OnPlayerShotVehicle(playerid,vehicleid,weaponid,Float:amount,bodypart); //Called when a player shoots at a vehicle.            *
 * OnVehiclePosChange(vehicleid,Float:newx,Float:newy,Float:newz,Float:newangle,Float:oldx,Float:oldy,Float:oldz,Float:oldangle); *
 * OnVehicleVelocityChange(vehicleid,Float:newx,Float:newy,Float:newz,Float:oldx,Float:oldy,Float:oldz);                          *
 * OnVehicleHealthChange(vehicleid,Float:newhealth,Float:oldhealth);                                                              *
 * OnVehicleFuelChange(vehicleid,newfuel,oldfuel);                                                                                *
 * OnVehicleBombDeactivate(vehicleid);                                                                                            *
 * OnVehicleBombExplode(vehicleid);                                                                                               *
 * OnPlayerEditVehicle(playerid,vehicleid,response,Float:fX,Float:fY,Float:fZ,Float:fRotZ);                                       *
 * OnPlayerEditVehicleObject(playerid,vehicleid,response,Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz);                     *
 * OnPlayerReachSpeedCapLimit(playerid,vehicleid,Float:speed);                                                                    *
 * OnVehicleBombActivate(vehicleid);                                                                                              *
 * OnVehicleModEx(playerid,vehicleid,componentid,price,illegal);                                                                  *
 *                                                                                                                                *
 * Definitions:                                                                                                                   *
 * INVALID_SEAT_ID                                                                                                                *
 * INVALID_PAINTJOB_ID                                                                                                            *
 * VEHICLE_UPDATE_INTERVAL                                                                                                        *
 * MAX_VEHICLE_ATTACHED_OBJECTS                                                                                                   *
 * RESET_PAINTJOB_ID                                                                                                              *
 * MAX_VEHICLE_PARAMS                                                                                                             *
 * MAX_VEHICLE_MODELS                                                                                                             *
 * DEFAULT_VEHICLE_FUEL                                                                                                           *
 * VEHICLE_SPEED_MULTIPLIER                                                                                                       *
 * MULTIPLIER_FUEL_SYSTEM                                                                                                         *
 *                                                                                                                                *
 * BONNET_HEALTHY_CLOSED                                                                                                          *
 * BONNET_HEALTHY_OPENED                                                                                                          *
 * BONNET_DAMAGED_CLOSED                                                                                                          *
 * BONNET_DAMAGED_OPENED                                                                                                          *
 * BONNET_MISSING                                                                                                                 *
 *                                                                                                                                *
 * BOOT_HEALTHY_CLOSED                                                                                                            *
 * BOOT_HEALTHY_OPENED                                                                                                            *
 * BOOT_DAMAGED_CLOSED                                                                                                            *
 * BOOT_DAMAGED_OPENED                                                                                                            *
 * BOOT_MISSING                                                                                                                   *
 *                                                                                                                                *
 * DOOR_HEALTHY_CLOSED                                                                                                            *
 * DOOR_HEALTHY_OPENED                                                                                                            *
 * DOOR_DAMAGED_CLOSED                                                                                                            *
 * DOOR_DAMAGED_OPENED                                                                                                            *
 * DOOR_MISSING                                                                                                                   *
 *                                                                                                                                *
 * BUMPER_HEALTHY                                                                                                                 *
 * BUMPER_CRUSHED                                                                                                                 *
 * BUMPER_HANGING                                                                                                                 *
 * BUMPER_MISSING                                                                                                                 *
 *                                                                                                                                *
 * WINDSHIELD_HEALTHY                                                                                                             *
 * WINDSHIELD_DAMAGED                                                                                                             *
 * WINDSHIELD_MISSING                                                                                                             *
 *                                                                                                                                *
 * LIGHT_ENABLE                                                                                                                   *
 * LIGHT_DISABLE                                                                                                                  *
 *                                                                                                                                *
 * TIRE_HEALTHY                                                                                                                   *
 * TIRE_DAMAGED                                                                                                                   *
 *                                                                                                                                *
 * DOOR_DRIVER                                                                                                                    *
 * DOOR_PASSENGER                                                                                                                 *
 * DOOR_BACKLEFF                                                                                                                  *
 * DOOR_BACKRIGHT                                                                                                                 *
 *                                                                                                                                *
 * VEHICLE_DAMAGE_PANELS                                                                                                          *
 * VEHICLE_DAMAGE_DOORS                                                                                                           *
 * VEHICLE_DAMAGE_LIGHTS                                                                                                          *
 * VEHICLE_DAMAGE_TIRES                                                                                                           *
 *                                                                                                                                *
 * RED_NEON                                                                                                                       *
 * BLUE_NEON                                                                                                                      *
 * GREEN_NEON                                                                                                                     *
 * YELLOW_NEON                                                                                                                    *
 * PINK_NEON                                                                                                                      *
 * WHITE_NEON                                                                                                                     *
 *                                                                                                                                *
 * MIN_VEHICLE_COMPONENT_ID                                                                                                       *
 * MAX_VEHICLE_COMPONENT_ID                                                                                                       *
 *                                                                                                                                *
 * Enums:                                                                                                                         *
 * enum 'EVF::VehicleProperties'                                                                                                  *
 * # e_VEHICLE_PAINTJOB                                                                                                           *
 * # e_VEHICLE_INTERIOR                                                                                                           *
 * # e_VEHICLE_COLOR_1                                                                                                            *
 * # e_VEHICLE_COLOR_2                                                                                                            *
 * # e_VEHICLE_HORN                                                                                                               *
 * # e_VEHICLE_SPAWN_X                                                                                                            *
 * # e_VEHICLE_SPAWN_Y                                                                                                            *
 * # e_VEHICLE_SPAWN_Z                                                                                                            *
 * # e_VEHICLE_SPAWN_A                                                                                                            *
 * # e_VEHICLE_SPAWN_VW                                                                                                           *
 * # e_VEHICLE_SPAWN_INT                                                                                                          *
 * # e_VEHICLE_SPEED_CAP                                                                                                          *
 * # e_VEHICLE_FUEL_USE                                                                                                           *
 * # e_VEHICLE_FUEL                                                                                                               *
 * # e_VEHICLE_STICKY                                                                                                             *
 * # e_VEHICLE_UNO_DAMAGE                                                                                                         *
 * # e_VEHICLE_CAP_DAMAGE                                                                                                         *
 * # e_VEHICLE_EDITOR                                                                                                             *
 * # e_VEHICLE_DAMAGE_PANELS                                                                                                      *
 * # e_VEHICLE_DAMAGE_DOORS                                                                                                       *
 * # e_VEHICLE_DAMAGE_LIGHTS                                                                                                      *
 * # e_VEHICLE_DAMAGE_TIRES                                                                                                       *
 * # e_VEHICLE_BOMB                                                                                                               *
 * # e_VEHICLE_BOMB_TIMER                                                                                                         *
 * # e_VEHICLE_BULLETPROOF                                                                                                        *
 * # e_VEHICLE_STORED                                                                                                             *
 *                                                                                                                                *
 * enum 'EVF::VehicleBodyPart'                                                                                                    *
 * # VEHICLE_BODYPART_UNKNOWN                                                                                                     *
 * # VEHICLE_BODYPART_FL_WHEEL    - Front Left                                                                                    *
 * # VEHICLE_BODYPART_FR_WHEEL    - Front Right                                                                                   *
 * # VEHICLE_BODYPART_BL_WHEEL    - Back Left                                                                                     *
 * # VEHICLE_BODYPART_BR_WHEEL    - Back Right                                                                                    *
 * # VEHICLE_BODYPART_PETROLCAP                                                                                                   *
 *                                                                                                                                *
 * enum 'EVF::ParamTypes'                                                                                                         *
 * # VEHICLE_TYPE_ENGINE                                                                                                          *
 * # VEHICLE_TYPE_LIGHTS                                                                                                          *
 * # VEHICLE_TYPE_ALARM                                                                                                           *
 * # VEHICLE_TYPE_DOORS                                                                                                           *
 * # VEHICLE_TYPE_BONNET                                                                                                          *
 * # VEHICLE_TYPE_BOOT                                                                                                            *
 * # VEHICLE_TYPE_OBJECTIVE                                                                                                       *
 *                                                                                                                                *
 **********************************************************************************************************************************/ 
Some options will only work if the player is in a vehicle.

Download:
EVF.inc

Notice:
Posts can be made available in a other language forums, please remember to keep the author and permanent link to file on github and a link to post in forum samp.


Non-Registered Users:
Bug Report

Last edited by AbyssMorgan; 10/09/2017 at 09:55 PM. Reason: Update v3.1.1
AbyssMorgan is offline   Reply With Quote
Old 02/07/2016, 11:37 PM   #2
JustMe.77
Huge Clucker
 
JustMe.77's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 272
Reputation: 63
Default Re: Vehicle Extended Functions

Looks neat, nice one !
JustMe.77 is offline   Reply With Quote
Old 03/07/2016, 04:41 AM   #3
SetPlayerNameTag
Big Clucker
 
SetPlayerNameTag's Avatar
 
Join Date: Jan 2015
Location: Killerchina
Posts: 176
Reputation: 3
Default Re: Vehicle Extended Functions

This is what I was looking for!
SetPlayerNameTag is offline   Reply With Quote
Old 15/08/2016, 11:09 AM   #4
Freaksken
Gangsta
 
Freaksken's Avatar
 
Join Date: Mar 2009
Location: Belgium
Posts: 531
Reputation: 209
Default Re: Vehicle Extended Functions

Exactly what I needed, thanks man!

EDIT:
After some figuring out why the provided light functions did not work correctely, I found that the lights used the wrong bits.
I've updated the functions on this wiki page and added the documentation on this wiki page.
__________________
Always keep in mind that a lot of people are active on this forum in their spare time.
They are sacrificing time they could easily spend on things they would rather do, to help you instead.


[Include] FCNPC A.I. - [Tutorial] Speedometer - [WIP] Single-player-like Mission - [Other] List of all my work

Last edited by Freaksken; 15/08/2016 at 07:21 PM.
Freaksken is online now   Reply With Quote
Old 15/08/2016, 07:50 PM   #5
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,262
Reputation: 323
Default Re: Vehicle Extended Functions

Update v1.2.0:

- Fixed functions (special thanks for Freaksken):
PHP Code:
//syntax has been changed
GetVehicleLights(vehicleid,&front_left_light,&front_right_light,&back_lights);
SetVehicleLights(vehicleid,front_left_light,front_right_light,back_lights); 
AbyssMorgan is offline   Reply With Quote
Old 22/11/2016, 05:35 PM   #6
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,262
Reputation: 323
Default Re: Vehicle Extended Functions

Update v2.0.0:

- Merged includes EVF.inc and VehicleEx.inc -> EVF.inc
- Fixed hook
- Update compatibility for YSF
- Update compatibility for SA:MP 0.3.7
- Added functions (from EVF.inc):
PHP Code:
GetVehicleParams(vehicleid,type);
SetVehicleParams(vehicleid,type,status,delay 0);
GetVehicleBoot(vehicleid,&Float:x,&Float:y,&Float:z);
GetVehicleHood(vehicleid,&Float:x,&Float:y,&Float:z);
GetVehicleRoof(vehicleid,&Float:x,&Float:y,&Float:z);
GetVehicleRandomColors(modelid,&color1,&color2);
GetVehicleColor(vehicleid,&color1,&color2);
GetNearestVehicle(vehicleid);
GetVehiclePaintjob(vehicleid);
GetVehicleDriver(vehicleid);
GetVehicleTopSpeed(vehicleid);
GetVehicleInterior(vehicleid);
SetVehicleInterior(vehicleid,interiorid);
GetVehicleSeats(vehicleid);
GetVehicleModelSeats(modelid);
ResetVehiclePaintjob(vehicleid);
IsVehicleSeatOccupied(vehicleid,seatid);
IsValidVehicle(vehicleid); 
- Added callbacks (from EVF.inc):
PHP Code:
OnVehicleCreated(vehicleid); //Called when a vehicle is created.
OnVehicleDestroyed(vehicleid); //Called when a vehicle is deleted.
OnTrailerHooked(playerid,vehicleid,trailerid); //Called when a trailer is hooked.
OnTrailerUnhooked(playerid,vehicleid,trailerid); //Called when a trailer is unhooked.
OnPlayerShootVehicle(playerid,vehicleid,weaponid); //Called when a player shoots at a vehicle. 
- Added definitions (from EVF.inc):
PHP Code:
//Param Types:
VEHICLE_TYPE_ENGINE
VEHICLE_TYPE_LIGHTS
VEHICLE_TYPE_ALARM
VEHICLE_TYPE_DOORS
VEHICLE_TYPE_BONNET
VEHICLE_TYPE_BOOT
VEHICLE_TYPE_OBJECTIVE

//Offset Types:
VEHICLE_OFFSET_BOOT
VEHICLE_OFFSET_HOOD
VEHICLE_OFFSET_ROOF 
AbyssMorgan is offline   Reply With Quote
Old 22/11/2016, 08:01 PM   #7
Iszcegg
Gangsta
 
Iszcegg's Avatar
 
Join Date: Oct 2013
Location: Venezuela
Posts: 839
Reputation: 90
Default Re: Vehicle Extended Functions

Add support for https://wiki.sa-mp.com/wiki/SetVehicleParamsCarWindows and https://wiki.sa-mp.com/wiki/GetVehicleParamsCarDoors

Code:
SetVehicleWindowState(vehicleid, window_id, bool:state);
GetVehicleWindowState(vehicleid, window_id);
Code:
Window's id's:
  1. DRIVER
  2. PASSENGER
  3. BACKLEFF
  4. BACKRIGHT
States:
  1. TRUE - opened.
  2. FALSE - closed.
In addition to these features, it has the maximum compatibility with all cars. Those who have 4 windows, 2 windows and those that do not have windows.

In my GM I have an array which contains the amount of window of each vehicle, I hope it will use you as "IsValidWindow" or something related to that.

Code:
new Windows[212][] =
{
     {4}, // Landstalker
     {2}, // Bravura
     {2}, // Buffalo
     {2}, // Linerunner
     {4}, // Perenniel
     {4}, // Sentinel
     {2}, // Dumper
     {2}, // Firetruck
     {2}, // Trashmaster
     {4}, // Stretch
     {2}, // Manana
     {2}, // Infernus
     {2}, // Voodoo
     {2}, // Pony
     {2}, // Mule
     {2}, // Cheetah
     {2}, // Ambulance
     {2}, // Leviathan
     {4}, // Moonbeam
     {2}, // Esperanto
     {4}, // Taxi
     {4}, // Washington
     {2}, // Bobcat
     {2}, // Mr. Whoopee
     {0}, // BF Injection
     {1}, // Hunter
     {4}, // Premier
     {2}, // Enforcer
     {2}, // Securicar
     {0}, // Banshee
     {0}, // Predator
     {0}, // Bus
     {0}, // Rhino
     {2}, // Barracks
     {2}, // Hotknife
     {0}, // Article trailer
     {2}, // Previon
     {0}, // Coach
     {4}, // Cabbie
     {0}, // Stallion
     {2}, // Rumpo
     {0}, // RC Bandit
     {2}, // Romero
     {2}, // Packer
     {2}, // Monster
     {4}, // Admiral
     {0}, // Squallo
     {2}, // Seasparrow
     {0}, // Pizzaboy
     {0}, // Tram
     {0}, // Article Trailer 2
     {2}, // Turismo
     {0}, // Speeder
     {0}, // Reefer
     {0}, // Tropic
     {2}, // Flatbed
     {2}, // Yankee
     {0}, // Caddy
     {4}, // Solair
     {2}, // Topfun Van (Berkley's RC)
     {0}, // Skimmer
     {0}, // PCJ-600
     {0}, // Faggio
     {0}, // Freeway
     {0}, // RC Baron
     {0}, // RC Raider
     {4}, // Glendale
     {4}, // Oceanic
     {0}, // Sanchez
     {2}, // Sparrow
     {4}, // Patriot
     {0}, // Quad
     {0}, // Coastguard
     {0}, // Dinghy
     {2}, // Hermes
     {2}, // Sabre
     {1}, // Rustler
     {2}, // ZR-350
     {2}, // Walton
     {4}, // Regina
     {0}, // Comet
     {0}, // BMX
     {2}, // Burrito
     {2}, // Camper
     {0}, // Marquis
     {0}, // Baggage
     {0}, // Dozer
     {4}, // Maverick
     {4}, // SAN News Maverick
     {2}, // Rancher
     {4}, // FBI Rancher
     {2}, // Virgo
     {4}, // Greenwood
     {0}, // Jetmax
     {0}, // Hotring Racer
     {2}, // Sandking
     {2}, // Blista Compact
     {4}, // Police Maverick
     {2}, // Boxville
     {2}, // Benson
     {2}, // Mesa
     {0}, // RC Goblin
     {0}, // Hotring Racer A
     {0}, // Hotring Racer B
     {0}, // Bloodring Banger
     {2}, // Rancher Lure
     {2}, // Super GT
     {4}, // Elegant
     {2}, // Journey
     {0}, // Bike
     {0}, // Mountain Bike
     {2}, // Beagle
     {0}, // Cropduster
     {0}, // Stuntplane
     {2}, // Tanker
     {2}, // Roadtrain
     {4}, // Nebula
     {2}, // Majestic
     {2}, // Buccaneer
     {0}, // Shamal
     {1}, // Hydra
     {0}, // FCR-900
     {0}, // NRG-500
     {0}, // HPV1000
     {2}, // Cement Truck
     {2}, // Towtruck
     {2}, // Fortune
     {2}, // Cadrona
     {2}, // FBI Truck
     {4}, // Willard
     {0}, // Forklift
     {0}, // Tractor
     {0}, // Combine Harvester
     {0}, // Feltzer
     {2}, // Remington
     {2}, // Slamvan
     {0}, // Blade
     {0}, // Freight (Train)
     {0}, // Brownstreak (Train)
     {0}, // Vortex
     {4}, // Vincent
     {2}, // Bullet
     {2}, // Clover
     {2}, // Sadler
     {2}, // Firetruck LA
     {2}, // Hustler
     {4}, // Intruder
     {4}, // Primo
     {0}, // Cargobob
     {2}, // Tampa
     {4}, // Sunrise
     {4}, // Merit
     {2}, // Utility van
     {0}, // Nevada
     {2}, // Yosemite
     {0}, // Windsor
     {2}, // Monster "A"
     {2}, // Monster "B"
     {2}, // Uranus
     {2}, // Jester
     {4}, // Sultan
     {4}, // Stratum
     {2}, // Elegy
     {2}, // Raindance
     {0}, // RC Tiger
     {2}, // Flash
     {4}, // Tahoma
     {0}, // Savanna
     {0}, // Bandito
     {0}, // Freight Flat Trailer (Train)
     {0}, // Streak Trailer (Train)
     {0}, // Kart
     {0}, // Mower
     {2}, // Dune
     {2}, // Sweeper
     {0}, // Broadway
     {2}, // Tornado
     {0}, // AT400
     {2}, // DFT-30
     {4}, // Huntley
     {4}, // Stafford
     {0}, // BF-400
     {2}, // Newsvan
     {2}, // Tug
     {0}, // Petrol Trailer
     {4}, // Emperor
     {0}, // Wayfarer
     {2}, // Euros
     {2}, // Hotdog
     {2}, // Club
     {0}, // Freight Box Trailer (Train)
     {0}, // Article Trailer 3
     {0}, // Andromada
     {2}, // Dodo
     {0}, // RC Cam
     {0}, // Launch
     {4}, // Police Car (LSPD)
     {4}, // Police Car (SFPD)
     {4}, // Police Car (LVPD)
     {2}, // Police Ranger
     {2}, // Picador
     {0}, // S.W.A.T
     {2}, // Alpha
     {2}, // Phoenix
     {4}, // Glendale Shit
     {2}, // Sadler Shit
     {0}, // Baggage Trailer "A"
     {0}, // Baggage Trailer "B"
     {0}, // Tug Stairs Trailer
     {2}, // Boxville
     {0}, // Farm Trailer
     {0} // Utility Trailer
};
Iszcegg is offline   Reply With Quote
Old 22/11/2016, 08:49 PM   #8
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 142
Reputation: 119
Default Re: Vehicle Extended Functions

Nice one, rep+
Ivan_Ino is offline   Reply With Quote
Old 24/11/2016, 05:34 PM   #9
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,262
Reputation: 323
Default Re: Vehicle Extended Functions

Update v2.0.1:

- Added functions:
PHP Code:
GetVehicleWindowState(vehicleid,doorid);
SetVehicleWindowState(vehicleid,doorid,window_state);
GetVehicleDoorState(vehicleid,doorid);
SetVehicleDoorState(vehicleid,doorid,door_state);

bool:IsValidVehicleDoor(vehicleid,doorid);
GetVehicleDoorAmountByModelid(modelid);
GetVehicleDoorAmount(vehicleid); 
- Added definitions:
PHP Code:
//Door ID:
DOOR_DRIVER
DOOR_PASSENGER
DOOR_BACKLEFF
DOOR_BACKRIGHT

//Other:
MAX_VEHICLE_MODEL 
AbyssMorgan is offline   Reply With Quote
Old 24/11/2016, 05:39 PM   #10
ISmokezU
Gangsta
 
Join Date: Aug 2016
Posts: 510
Reputation: 58
Default Re: Vehicle Extended Functions

Quote:
Originally Posted by Freaksken View Post
Exactly what I needed, thanks man!

EDIT:
After some figuring out why the provided light functions did not work correctely, I found that the lights used the wrong bits.
I've updated the functions on this wiki page and added the documentation on this wiki page.
Would be good to do a reversing light,or an indicator with different color lights or even at all. it would just be great.
ISmokezU 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] Extended vehicle functions Emmet_ Includes 63 21/11/2016 09:00 PM
[Include] Extended Actor Functions Admigo Includes 16 18/10/2016 05:10 PM
[Include] Extended Actor Functions Emmet_ Includes 47 09/07/2016 08:23 AM
[Include] Extended functions on Vehicles / Seats d3ll Includes 3 04/08/2014 06:25 AM
[Include] FCNPC Extended Functions Pottus Includes 3 27/05/2014 04:37 AM


All times are GMT. The time now is 09:57 PM.


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