[saco] Implement/match CVehicle::SetLockedState(...)

This commit is contained in:
RD42 2024-08-20 22:55:12 +08:00
parent fdbaa2a9e6
commit 075133ad72
3 changed files with 16 additions and 0 deletions

View File

@ -68,6 +68,7 @@ const SCRIPT_COMMAND play_sound = { 0x018c, "fffi" };
const SCRIPT_COMMAND enable_train_traffic = { 0x06d7, "i" };
const SCRIPT_COMMAND lock_car = { 0x0519, "ii" };
const SCRIPT_COMMAND put_train_at = { 0x07c7, "ifff" };
const SCRIPT_COMMAND get_active_interior = { 0x077e, "v" };

View File

@ -66,3 +66,16 @@ BOOL CVehicle::IsOccupied()
//-----------------------------------------------------------
void CVehicle::SetLockedState(int iLocked)
{
if(!m_pVehicle) return;
if(iLocked) {
ScriptCommand(&lock_car,m_dwGTAId,1);
} else {
ScriptCommand(&lock_car,m_dwGTAId,0);
}
}
//-----------------------------------------------------------

View File

@ -20,6 +20,8 @@ public:
void ResetPointers();
void SetLockedState(int iLocked);
BOOL HasADriver();