[saco] Implement/match CVehicle::HasSunk()

This commit is contained in:
RD42 committed 2024-08-20 23:03:15 +08:00
1 parent 4487d2b715
commit 3320ed4e95
3 files changed
+11

No files matched your search

+1
View File
@@ -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" };
+9
View File
@@ -109,3 +109,12 @@ void CVehicle::SetHealth(float fHealth)
//-----------------------------------------------------------
BOOL CVehicle::HasSunk()
{
if(!m_pVehicle) return FALSE;
return ScriptCommand(&has_car_sunk,m_dwGTAId);
}
//-----------------------------------------------------------
+1
View File
@@ -25,6 +25,7 @@ public:
float GetHealth();
void SetHealth(float fHealth);
BOOL HasSunk();
BOOL HasADriver();
void SetEngineState(BOOL bState);