@@ -127,6 +127,8 @@ void CLuaVehicleDefs::LoadFunctions ( void )
127127 CLuaCFunctions::AddFunction ( " setVehiclePlateText" , SetVehiclePlateText );
128128 CLuaCFunctions::AddFunction ( " setHeliBladeCollisionsEnabled" , SetHeliBladeCollisionsEnabled );
129129 CLuaCFunctions::AddFunction ( " setVehicleWindowOpen" , SetVehicleWindowOpen );
130+ CLuaCFunctions::AddFunction (" setVehicleModelExhaustPosition" , SetVehicleModelExhaustPosition);
131+ CLuaCFunctions::AddFunction (" getVehicleModelExhaustPosition" , GetVehicleModelExhaustPosition);
130132}
131133
132134
@@ -3550,3 +3552,51 @@ int CLuaVehicleDefs::IsVehicleWindowOpen ( lua_State* luaVM )
35503552 lua_pushboolean ( luaVM, false );
35513553 return 1 ;
35523554}
3555+
3556+ int CLuaVehicleDefs::SetVehicleModelExhaustPosition (lua_State* luaVM)
3557+ {
3558+ // bool setVehicleModelExhaustPosition(int modelID, float x, float y, float z)
3559+ unsigned short modelID; CVector position;
3560+
3561+ CScriptArgReader argStream (luaVM);
3562+ argStream.ReadNumber (modelID);
3563+ argStream.ReadVector3D (position);
3564+
3565+ if (!argStream.HasErrors ())
3566+ {
3567+ CClientVehicle::SetModelExhaustPosition (modelID, position);
3568+
3569+ lua_pushboolean (luaVM, true );
3570+ return 1 ;
3571+ }
3572+ else
3573+ m_pScriptDebugging->LogCustom (luaVM, argStream.GetFullErrorMessage ());
3574+
3575+ lua_pushboolean (luaVM, false );
3576+ return 1 ;
3577+ }
3578+
3579+ int CLuaVehicleDefs::GetVehicleModelExhaustPosition (lua_State* luaVM)
3580+ {
3581+ // bool getVehicleModelExhaustPosition(int modelID, float x, float y, float z)
3582+ unsigned short modelID;
3583+
3584+ CScriptArgReader argStream (luaVM);
3585+ argStream.ReadNumber (modelID);
3586+
3587+ if (!argStream.HasErrors ())
3588+ {
3589+ CVector position = CClientVehicle::GetModelExhaustPosition (modelID);
3590+
3591+ lua_pushnumber (luaVM, position.fX );
3592+ lua_pushnumber (luaVM, position.fY );
3593+ lua_pushnumber (luaVM, position.fZ );
3594+ return 3 ;
3595+ }
3596+ else
3597+ m_pScriptDebugging->LogCustom (luaVM, argStream.GetFullErrorMessage ());
3598+
3599+ lua_pushboolean (luaVM, false );
3600+ return 1 ;
3601+ }
3602+
0 commit comments