@@ -31,6 +31,7 @@ void CLuaPedDefs::LoadFunctions(void)
31
31
CLuaCFunctions::AddFunction (" getPedWeapon" , GetPedWeapon);
32
32
CLuaCFunctions::AddFunction (" getPedClothes" , GetPedClothes);
33
33
CLuaCFunctions::AddFunction (" doesPedHaveJetPack" , DoesPedHaveJetPack);
34
+ CLuaCFunctions::AddFunction (" isPedWearingJetpack" , DoesPedHaveJetPack); // introduced in 1.5.5-9.13176
34
35
CLuaCFunctions::AddFunction (" isPedOnGround" , IsPedOnGround);
35
36
CLuaCFunctions::AddFunction (" getPedFightingStyle" , GetPedFightingStyle);
36
37
CLuaCFunctions::AddFunction (" getPedWalkingStyle" , GetPedMoveAnim);
@@ -104,20 +105,19 @@ void CLuaPedDefs::AddClass(lua_State* luaVM)
104
105
lua_classfunction (luaVM, " isInWater" , " isPedInWater" );
105
106
lua_classfunction (luaVM, " isOnGround" , " isPedOnGround" );
106
107
lua_classfunction (luaVM, " isInVehicle" , " isPedInVehicle" );
107
-
108
108
lua_classfunction (luaVM, " isOnFire" , " isPedOnFire" );
109
109
lua_classfunction (luaVM, " isChoking" , " isPedChoking" );
110
110
lua_classfunction (luaVM, " isDoingGangDriveby" , " isPedDoingGangDriveby" );
111
111
lua_classfunction (luaVM, " isFrozen" , " isPedFrozen" );
112
112
lua_classfunction (luaVM, " isHeadless" , " isPedHeadless" );
113
+ lua_classfunction (luaVM, " isWearingJetpack" , " isPedWearingJetpack" ); // introduced in 1.5.5-9.13176
113
114
114
115
lua_classfunction (luaVM, " getArmor" , " getPedArmor" );
115
116
lua_classfunction (luaVM, " getFightingStyle" , " getPedFightingStyle" );
116
117
lua_classfunction (luaVM, " getGravity" , " getPedGravity" );
117
118
lua_classfunction (luaVM, " getStat" , " getPedStat" );
118
119
lua_classfunction (luaVM, " getWeaponSlot" , " getPedWeaponSlot" );
119
120
lua_classfunction (luaVM, " getWalkingStyle" , " getPedWalkingStyle" );
120
-
121
121
lua_classfunction (luaVM, " getAmmoInClip" , " getPedAmmoInClip" );
122
122
lua_classfunction (luaVM, " getOccupiedVehicle" , " getPedOccupiedVehicle" );
123
123
lua_classfunction (luaVM, " getWeapon" , " getPedWeapon" );
@@ -162,13 +162,10 @@ void CLuaPedDefs::AddClass(lua_State* luaVM)
162
162
GetPedOccupiedVehicle); // what about removePedFromVehicle?
163
163
lua_classvariable (luaVM, " dead" , " killPed" , " isPedDead" ); // Setting this to any value will still kill the ped. Should we special case this?
164
164
lua_classvariable (luaVM, " walkingStyle" , " setPedWalkingStyle" , " getPedWalkingStyle" );
165
- lua_classvariable (luaVM, " jetpack" , " setPedWearingJetpack" , " doesPedHaveJetPack " );
165
+ lua_classvariable (luaVM, " jetpack" , " setPedWearingJetpack" , " isPedWearingJetpack " ); // introduced in 1.5.5-9.13176
166
166
// lua_classvariable ( luaVM, "stats", "setPedStat", "getPedStat", CLuaOOPDefs::SetPedStat, CLuaOOPDefs::GetPedStat ); // table
167
167
// lua_classvariable ( luaVM, "controlState", "setPedControlState", "getPedControlState", CLuaOOPDefs::SetPedControlState, CLuaOOPDefs::GetPedControlState
168
168
// ); // TODO: .controlState["control"] = value
169
- // This commented code will syntax error, a new method has to be implemented to support this
170
- // lua_classvariable ( luaVM, "jetpack", {"removePedJetPack","givePedJetPack}, "doesPedHaveJetPack", CLuaOOPDefs::SetJetpackActive, "doesPedHaveJetPack" );
171
- // // very specialised!
172
169
173
170
lua_registerclass (luaVM, " Ped" , " Element" );
174
171
}
0 commit comments