diff --git a/saco/game/scripting.h b/saco/game/scripting.h index c80b750..229f222 100644 --- a/saco/game/scripting.h +++ b/saco/game/scripting.h @@ -53,6 +53,7 @@ const SCRIPT_COMMAND create_icon_marker_sphere = { 0x02A7, "fffiv" }; const SCRIPT_COMMAND add_to_player_money = { 0x0109, "ii" }; // PLAYER_CHAR, money +const SCRIPT_COMMAND has_car_sunk = { 0x02bf, "i" }; // CarID const SCRIPT_COMMAND get_ground_z = { 0x02ce, "fffv" }; // x, y, z, var_ground_z const SCRIPT_COMMAND destroy_racing_checkpoint = { 0x06d6, "i" }; diff --git a/saco/game/vehicle.cpp b/saco/game/vehicle.cpp index fae6418..3e9bb62 100644 --- a/saco/game/vehicle.cpp +++ b/saco/game/vehicle.cpp @@ -109,3 +109,12 @@ void CVehicle::SetHealth(float fHealth) //----------------------------------------------------------- +BOOL CVehicle::HasSunk() +{ + if(!m_pVehicle) return FALSE; + + return ScriptCommand(&has_car_sunk,m_dwGTAId); +} + +//----------------------------------------------------------- + diff --git a/saco/game/vehicle.h b/saco/game/vehicle.h index e7c3565..7b602aa 100644 --- a/saco/game/vehicle.h +++ b/saco/game/vehicle.h @@ -25,6 +25,7 @@ public: float GetHealth(); void SetHealth(float fHealth); + BOOL HasSunk(); BOOL HasADriver(); void SetEngineState(BOOL bState);