//Engines
ToggleVehicleEngine(vehicle, status); //Set STATUS to 1 to turn it on or 0 to turn it off
GetVehicleEngineStatusString(vehicle); //returns string such as "On" or "Off" depending on engine status
GetVehicleEngineStatus(vehicle); //Same as GetVehicleEngineStatusString but returns intergrer
AutomaticEngineSwitch(vehicle); //It will automaticly switch car engine on/off
//lights
ToggleVehicleLights(vehicle, status); //Set STATUS to 1 to turn it on or 0 to turn it off
GetVehicleLightsStatusString(vehicle); //returns string such as "On" or "Off" depending on light status
GetVehicleLightsStatus(vehicle); //Same as GetVehicleLightsStatusString but returns intergrer
AutomaticLightSwitch(vehicle); //It will automaticly switch car lights on/off
//Trunks
ToggleVehicleTrunk(vehicle, status); //Set STATUS to 1 to open it on or 0 to close it
GetVehicleTrunkStatusString(vehicle) //returns string such as "Open" or "Closed" depending on trunk status
GetVehicleTrunkStatus(vehicle); //Same as GetVehicleTrunkStatusString but returns intergrer
ToggleNearestPlayerTrunk(playerid,status); //Set STATUS to 1 to open or 0 to close. It will open/close nearest vehicle trunk thats in range of 10 meters
ToggleAutomaticNearestTrunk(playerid); //It will automaticly open/close nearest vehicles trunk thats in range of 10 meters.
//Locks
ToggleVehicleLock(vehicle,status); //Set STATUS to 1 to lock car or 0 to unlock
GetVehicleLockStatusString(vehicle) //returns string such as "Locked" or "Unlocked" depending on trunk status
GetVehicleLockStatus(vehicle) //Same as GetVehicleLockStatusString but returns intergrer
ToggleNarestVehicleLock(playerid) //this will lock/unlock narest player vehicle automaticly
GetNearCarLockString(playerid) //this will get status of vehicle locks that is nearest to the player (10 meters) and return in a string "Locked" or "Unlocked"
GetNearCarLock(playerid) //this will get status of vehicle lock that is nearest to the player (10 meters) and return it as an int. 0 as unlocked, 1 as locked
public OnVehicleStart(vehicleid)
public OnVehicleStop(vehicleid)
public OnVehicleLock(vehicleid)
public OnVehicleUnlock(vehicleid)
stock FixWindshield(vehicleid) {
new panels, doors, lights, tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
return UpdateVehicleDamageStatus(vehicleid, panels & 0xFFFF00FFFFFFFF, doors, lights, tires);
}
Script saying "error 017: undefined symbol "COLOR_RED". Add to top of your script #define COLOR_RED 0xAA3333AA Script saying "error 021: symbol already defined: "IsValidVehicle". Remove native IsValidVehicle(vehicleid); from the script |
#if !defined COLOR_RED
//#define it
#endif
#if !defined IsValidVehicle
//Put the native here
#endif
I suggest adding part fixing.
Check this out: http://forum.sa-mp.com/showpost.php?&p=3646664 You could use the code from any of those lines. Like a FixWindshield function: pawn Code:
|
Updates v.1.1 Added callback public OnVehicleStart(vehicleid) Added callback public OnVehicleStop(vehicleid) Added lock functionality Example code for v1.1: http://pastebin.com/zLyibUuE Added if defined (Thanks to Crayder) so there wont be any errors or warnings with this |
stock GetVehicleEngineStatusString(vehicle)
{
new StatusString[4];
return v_EngineStatus[vehicle] == 0 ? (StatusString = "Off") : (StatusString = "On");
}
PHP Code:
|
PHP Code:
|
#define GetVehicleEngineStatusString(%0) (v_EngineStatus[%0] == 0 ? ("Off") : ("On"))