1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
pub mod cfx { use cfx_core::types::ToMessagePack; #[inline] pub fn add_blip_for_coord(_x: f32, _y: f32, _z: f32) -> i32 { cfx_core::invoker::invoke(0xC6F43D0E, &[_x.into(), _y.into(), _z.into()]).unwrap_or_default() } #[inline] pub fn add_blip_for_entity(_entity: i32) -> i32 { cfx_core::invoker::invoke(0x30822554, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn add_blip_for_radius(_pos_x: f32, _pos_y: f32, _pos_z: f32, _radius: f32) -> i32 { cfx_core::invoker::invoke(0x4626756C, &[_pos_x.into(), _pos_y.into(), _pos_z.into(), _radius.into()]).unwrap_or_default() } #[inline] pub fn add_ped_decoration_from_hashes(_ped: i32, _collection: i32, _overlay: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x70559AC7, &[_ped.into(), _collection.into(), _overlay.into()]); } #[inline] pub fn apply_force_to_entity(_entity: i32, _force_type: i32, _x: f32, _y: f32, _z: f32, _off_x: f32, _off_y: f32, _off_z: f32, _bone_index: i32, _is_direction_rel: bool, _ignore_up_vec: bool, _is_force_rel: bool, _p_12: bool, _p_13: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xC1C0855A, &[_entity.into(), _force_type.into(), _x.into(), _y.into(), _z.into(), _off_x.into(), _off_y.into(), _off_z.into(), _bone_index.into(), _is_direction_rel.into(), _ignore_up_vec.into(), _is_force_rel.into(), _p_12.into(), _p_13.into()]); } #[inline] pub fn cancel_event() -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xFA29D35D, &[]); } #[inline] pub fn can_player_start_commerce_session(_player_src: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0x429461C3, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn clear_ped_prop(_ped: i32, _prop_id: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x2D23D743, &[_ped.into(), _prop_id.into()]); } #[inline] pub fn clear_ped_secondary_task(_ped: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xA635F451, &[_ped.into()]); } #[inline] pub fn clear_ped_tasks(_ped: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xDE3316AB, &[_ped.into()]); } #[inline] pub fn clear_ped_tasks_immediately(_ped: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xBC045625, &[_ped.into()]); } #[inline] pub fn clear_player_wanted_level(_player: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x54EA5BCC, &[_player.as_char_ptr().into()]); } #[inline] pub fn create_object(_model_hash: i32, _x: f32, _y: f32, _z: f32, _is_network: bool, _net_mission_entity: bool, _door_flag: bool) -> i32 { cfx_core::invoker::invoke(0x2F7AA05C, &[_model_hash.into(), _x.into(), _y.into(), _z.into(), _is_network.into(), _net_mission_entity.into(), _door_flag.into()]).unwrap_or_default() } #[inline] pub fn create_object_no_offset(_model_hash: i32, _x: f32, _y: f32, _z: f32, _is_network: bool, _net_mission_entity: bool, _door_flag: bool) -> i32 { cfx_core::invoker::invoke(0x58040420, &[_model_hash.into(), _x.into(), _y.into(), _z.into(), _is_network.into(), _net_mission_entity.into(), _door_flag.into()]).unwrap_or_default() } #[inline] pub fn create_ped(_ped_type: i32, _model_hash: i32, _x: f32, _y: f32, _z: f32, _heading: f32, _is_network: bool, _b_script_host_ped: bool) -> i32 { cfx_core::invoker::invoke(0x389EF71, &[_ped_type.into(), _model_hash.into(), _x.into(), _y.into(), _z.into(), _heading.into(), _is_network.into(), _b_script_host_ped.into()]).unwrap_or_default() } #[inline] pub fn create_ped_inside_vehicle(_vehicle: i32, _ped_type: i32, _model_hash: i32, _seat: i32, _is_network: bool, _b_script_host_ped: bool) -> i32 { cfx_core::invoker::invoke(0x3000F092, &[_vehicle.into(), _ped_type.into(), _model_hash.into(), _seat.into(), _is_network.into(), _b_script_host_ped.into()]).unwrap_or_default() } #[inline] pub fn create_vehicle(_model_hash: i32, _x: f32, _y: f32, _z: f32, _heading: f32, _is_network: bool, _net_mission_entity: bool) -> i32 { cfx_core::invoker::invoke(0xDD75460A, &[_model_hash.into(), _x.into(), _y.into(), _z.into(), _heading.into(), _is_network.into(), _net_mission_entity.into()]).unwrap_or_default() } #[inline] pub fn delete_entity(_entity: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xFAA3D236, &[_entity.into()]); } #[inline] pub fn delete_function_reference(_reference_identity: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x1E86F206, &[_reference_identity.as_char_ptr().into()]); } #[inline] pub fn delete_resource_kvp(_key: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x7389B5DF, &[_key.as_char_ptr().into()]); } #[inline] pub fn does_entity_exist(_entity: i32) -> bool { cfx_core::invoker::invoke(0x3AC90869, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn does_player_own_sku(_player_src: impl cfx_core::types::AsCharPtr, _sku_id: i32) -> bool { cfx_core::invoker::invoke(0x167ABA27, &[_player_src.as_char_ptr().into(), _sku_id.into()]).unwrap_or_default() } #[inline] pub fn does_player_own_sku_ext(_player_src: impl cfx_core::types::AsCharPtr, _sku_id: i32) -> bool { cfx_core::invoker::invoke(0xDEF0480B, &[_player_src.as_char_ptr().into(), _sku_id.into()]).unwrap_or_default() } #[inline] pub fn drop_player(_player_src: impl cfx_core::types::AsCharPtr, _reason: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xBA0613E1, &[_player_src.as_char_ptr().into(), _reason.as_char_ptr().into()]); } #[inline] pub fn duplicate_function_reference(_reference_identity: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0xF4E2079D, &[_reference_identity.as_char_ptr().into()]).ok() } #[inline] pub fn enable_enhanced_host_support(_enabled: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xF97B1C93, &[_enabled.into()]); } #[inline] pub fn end_find_kvp(_handle: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xB3210203, &[_handle.into()]); } #[inline] pub fn ensure_entity_state_bag(_entity: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x3BB78F05, &[_entity.into()]); } #[inline] pub fn execute_command(_command_string: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x561C060B, &[_command_string.as_char_ptr().into()]); } #[inline] pub fn find_kvp(_handle: i32) -> Option<String> { cfx_core::invoker::invoke(0xBD7BEBC5, &[_handle.into()]).ok() } #[inline] pub fn flag_server_as_private(_private: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x13B6855D, &[_private.into()]); } #[inline] pub fn freeze_entity_position(_entity: i32, _toggle: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x65C16D57, &[_entity.into(), _toggle.into()]); } #[inline] pub fn get_air_drag_multiplier_for_players_vehicle(_player_src: impl cfx_core::types::AsCharPtr) -> f32 { cfx_core::invoker::invoke(0x62FC38D0, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_all_objects<Ret: serde::de::DeserializeOwned>() -> Option<cfx_core::types::Packed<Ret>> { cfx_core::invoker::invoke(0x6886C3FE, &[]).ok() } #[inline] pub fn get_all_peds<Ret: serde::de::DeserializeOwned>() -> Option<cfx_core::types::Packed<Ret>> { cfx_core::invoker::invoke(0xB8584FEF, &[]).ok() } #[inline] pub fn get_all_vehicles<Ret: serde::de::DeserializeOwned>() -> Option<cfx_core::types::Packed<Ret>> { cfx_core::invoker::invoke(0x332169F5, &[]).ok() } #[inline] pub fn get_blip_sprite(_this: i32) -> i32 { cfx_core::invoker::invoke(0x72FF2E73, &[_this.into()]).unwrap_or_default() } #[inline] pub fn get_console_buffer() -> Option<String> { cfx_core::invoker::invoke(0xE57429FA, &[]).ok() } #[inline] pub fn get_convar(_var_name: impl cfx_core::types::AsCharPtr, _default: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0x6CCD2564, &[_var_name.as_char_ptr().into(), _default.as_char_ptr().into()]).ok() } #[inline] pub fn get_convar_int(_var_name: impl cfx_core::types::AsCharPtr, _default: i32) -> i32 { cfx_core::invoker::invoke(0x935C0AB2, &[_var_name.as_char_ptr().into(), _default.into()]).unwrap_or_default() } #[inline] pub fn get_current_resource_name() -> Option<String> { cfx_core::invoker::invoke(0xE5E9EBBB, &[]).ok() } #[inline] pub fn get_entity_coords(_entity: i32) -> cfx_core::types::Vector3 { cfx_core::invoker::invoke(0x1647F1CB, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_entity_heading(_entity: i32) -> f32 { cfx_core::invoker::invoke(0x972CC383, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_entity_health(_entity: i32) -> i32 { cfx_core::invoker::invoke(0x8E3222B7, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_entity_max_health(_entity: i32) -> i32 { cfx_core::invoker::invoke(0xC7AE6AA1, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_entity_model(_entity: i32) -> i32 { cfx_core::invoker::invoke(0xDAFCB3EC, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_entity_population_type(_entity: i32) -> i32 { cfx_core::invoker::invoke(0xFC30DDFF, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_entity_rotation(_entity: i32) -> cfx_core::types::Vector3 { cfx_core::invoker::invoke(0x8FF45B04, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_entity_rotation_velocity(_entity: i32) -> cfx_core::types::Vector3 { cfx_core::invoker::invoke(0x9BF8A73F, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_entity_routing_bucket(_entity: i32) -> i32 { cfx_core::invoker::invoke(0xED4B0486, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_entity_script(_entity: i32) -> Option<String> { cfx_core::invoker::invoke(0xB7F70784, &[_entity.into()]).ok() } #[inline] pub fn get_entity_type(_entity: i32) -> i32 { cfx_core::invoker::invoke(0xB1BD08D, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_entity_velocity(_entity: i32) -> cfx_core::types::Vector3 { cfx_core::invoker::invoke(0xC14C9B6B, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn get_game_timer() -> i64 { cfx_core::invoker::invoke(0xA4EA0691, &[]).unwrap_or_default() } #[inline] pub fn get_hash_key(_model: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x98EFF6F1, &[_model.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_host_id() -> Option<String> { cfx_core::invoker::invoke(0x5F70F5A3, &[]).ok() } #[inline] pub fn get_instance_id() -> i32 { cfx_core::invoker::invoke(0x9F1C4383, &[]).unwrap_or_default() } #[inline] pub fn get_invoking_resource() -> Option<String> { cfx_core::invoker::invoke(0x4D52FE5B, &[]).ok() } #[inline] pub fn get_is_vehicle_engine_running(_vehicle: i32) -> bool { cfx_core::invoker::invoke(0x7DC6D022, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_is_vehicle_primary_colour_custom(_vehicle: i32) -> bool { cfx_core::invoker::invoke(0xD7EC8760, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_is_vehicle_secondary_colour_custom(_vehicle: i32) -> bool { cfx_core::invoker::invoke(0x288AD228, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_landing_gear_state(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0xA6F02670, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_last_ped_in_vehicle_seat(_vehicle: i32, _index: i32) -> i32 { cfx_core::invoker::invoke(0xF7C6792D, &[_vehicle.into(), _index.into()]).unwrap_or_default() } #[inline] pub fn get_num_player_identifiers(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0xFF7F66AB, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_num_player_indices() -> i32 { cfx_core::invoker::invoke(0x63D13184, &[]).unwrap_or_default() } #[inline] pub fn get_num_player_tokens(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x619E4A3D, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_num_resources() -> i32 { cfx_core::invoker::invoke(0x863F27B, &[]).unwrap_or_default() } #[inline] pub fn get_num_resource_metadata(_resource_name: impl cfx_core::types::AsCharPtr, _metadata_key: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x776E864, &[_resource_name.as_char_ptr().into(), _metadata_key.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_password_hash(_password: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0x23473EA4, &[_password.as_char_ptr().into()]).ok() } #[inline] pub fn get_ped_armour(_ped: i32) -> i32 { cfx_core::invoker::invoke(0x2CE311A7, &[_ped.into()]).unwrap_or_default() } #[inline] pub fn get_ped_cause_of_death(_ped: i32) -> i32 { cfx_core::invoker::invoke(0x63458C27, &[_ped.into()]).unwrap_or_default() } #[inline] pub fn get_ped_desired_heading(_ped: i32) -> f32 { cfx_core::invoker::invoke(0xC182F76E, &[_ped.into()]).unwrap_or_default() } #[inline] pub fn get_ped_in_vehicle_seat(_vehicle: i32, _index: i32) -> i32 { cfx_core::invoker::invoke(0x388FDE9A, &[_vehicle.into(), _index.into()]).unwrap_or_default() } #[inline] pub fn get_ped_max_health(_ped: i32) -> i32 { cfx_core::invoker::invoke(0xA45B6C8D, &[_ped.into()]).unwrap_or_default() } #[inline] pub fn get_ped_script_task_command(_ped: i32) -> i32 { cfx_core::invoker::invoke(0x84FE084, &[_ped.into()]).unwrap_or_default() } #[inline] pub fn get_ped_script_task_stage(_ped: i32) -> i32 { cfx_core::invoker::invoke(0x44B0E5E2, &[_ped.into()]).unwrap_or_default() } #[inline] pub fn get_ped_source_of_damage(_ped: i32) -> i32 { cfx_core::invoker::invoke(0x535DB43F, &[_ped.into()]).unwrap_or_default() } #[inline] pub fn get_ped_source_of_death(_ped: i32) -> i32 { cfx_core::invoker::invoke(0x84ADF9EB, &[_ped.into()]).unwrap_or_default() } #[inline] pub fn get_ped_specific_task_type(_ped: i32, _index: i32) -> i32 { cfx_core::invoker::invoke(0x7F4563D3, &[_ped.into(), _index.into()]).unwrap_or_default() } #[inline] pub fn get_player_camera_rotation(_player_src: impl cfx_core::types::AsCharPtr) -> cfx_core::types::Vector3 { cfx_core::invoker::invoke(0x433C765D, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_endpoint(_player_src: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0xFEE404F9, &[_player_src.as_char_ptr().into()]).ok() } #[inline] pub fn get_player_fake_wanted_level(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x98D244, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_from_index(_index: i32) -> Option<String> { cfx_core::invoker::invoke(0xC8A9CE08, &[_index.into()]).ok() } #[inline] pub fn get_player_guid(_player_src: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0xE52D9680, &[_player_src.as_char_ptr().into()]).ok() } #[inline] pub fn get_player_identifier(_player_src: impl cfx_core::types::AsCharPtr, _identifier: i32) -> Option<String> { cfx_core::invoker::invoke(0x7302DBCF, &[_player_src.as_char_ptr().into(), _identifier.into()]).ok() } #[inline] pub fn get_player_invincible(_player_src: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0x680C90EE, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_last_msg(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x427E8E6A, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_max_armour(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x2A50657, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_max_health(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x8154E470, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_melee_weapon_damage_modifier(_player_id: impl cfx_core::types::AsCharPtr) -> f32 { cfx_core::invoker::invoke(0x8689A825, &[_player_id.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_name(_player_src: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0x406B4B20, &[_player_src.as_char_ptr().into()]).ok() } #[inline] pub fn get_player_ped(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x6E31E993, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_ping(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0xFF1290D4, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_routing_bucket(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x52441C34, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_team(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x9873E404, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_time_in_pursuit(_player_src: impl cfx_core::types::AsCharPtr, _last_pursuit: bool) -> i32 { cfx_core::invoker::invoke(0x7ADE63E1, &[_player_src.as_char_ptr().into(), _last_pursuit.into()]).unwrap_or_default() } #[inline] pub fn get_player_token(_player_src: impl cfx_core::types::AsCharPtr, _index: i32) -> Option<String> { cfx_core::invoker::invoke(0x54C06897, &[_player_src.as_char_ptr().into(), _index.into()]).ok() } #[inline] pub fn get_player_wanted_centre_position(_player_src: impl cfx_core::types::AsCharPtr) -> cfx_core::types::Vector3 { cfx_core::invoker::invoke(0x821F2D2C, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_wanted_level(_player_src: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0xBDCDD163, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_weapon_damage_modifier(_player_id: impl cfx_core::types::AsCharPtr) -> f32 { cfx_core::invoker::invoke(0x2A3D7CDA, &[_player_id.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_weapon_defense_modifier(_player_id: impl cfx_core::types::AsCharPtr) -> f32 { cfx_core::invoker::invoke(0xF1543251, &[_player_id.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_player_weapon_defense_modifier_2(_player_id: impl cfx_core::types::AsCharPtr) -> f32 { cfx_core::invoker::invoke(0x986B65FF, &[_player_id.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_registered_commands<Ret: serde::de::DeserializeOwned>() -> Option<cfx_core::types::Packed<Ret>> { cfx_core::invoker::invoke(0xD4BEF069, &[]).ok() } #[inline] pub fn get_resource_by_find_index(_find_index: i32) -> Option<String> { cfx_core::invoker::invoke(0x387246B7, &[_find_index.into()]).ok() } #[inline] pub fn get_resource_kvp_float(_key: impl cfx_core::types::AsCharPtr) -> f32 { cfx_core::invoker::invoke(0x35BDCEEA, &[_key.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_resource_kvp_int(_key: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0x557B586A, &[_key.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn get_resource_kvp_string(_key: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0x5240DA5A, &[_key.as_char_ptr().into()]).ok() } #[inline] pub fn get_resource_metadata(_resource_name: impl cfx_core::types::AsCharPtr, _metadata_key: impl cfx_core::types::AsCharPtr, _index: i32) -> Option<String> { cfx_core::invoker::invoke(0x964BAB1D, &[_resource_name.as_char_ptr().into(), _metadata_key.as_char_ptr().into(), _index.into()]).ok() } #[inline] pub fn get_resource_path(_resource_name: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0x61DCF017, &[_resource_name.as_char_ptr().into()]).ok() } #[inline] pub fn get_resource_state(_resource_name: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0x4039B485, &[_resource_name.as_char_ptr().into()]).ok() } #[inline] pub fn get_selected_ped_weapon(_ped: i32) -> i32 { cfx_core::invoker::invoke(0xD240123E, &[_ped.into()]).unwrap_or_default() } #[inline] pub fn get_state_bag_value<Ret: serde::de::DeserializeOwned>(_bag_name: impl cfx_core::types::AsCharPtr, _key: impl cfx_core::types::AsCharPtr) -> Option<cfx_core::types::Packed<Ret>> { cfx_core::invoker::invoke(0x637F4C75, &[_bag_name.as_char_ptr().into(), _key.as_char_ptr().into()]).ok() } #[inline] pub fn get_train_carriage_engine(_train: i32) -> i32 { cfx_core::invoker::invoke(0x95070FA, &[_train.into()]).unwrap_or_default() } #[inline] pub fn get_train_carriage_index(_train: i32) -> i32 { cfx_core::invoker::invoke(0x4B8285CF, &[_train.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_body_health(_vehicle: i32) -> f32 { cfx_core::invoker::invoke(0x2B2FCC28, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_colours(_vehicle: i32, _color_primary: &mut i32, _color_secondary: &mut i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x40D82D88, &[_vehicle.into(), _color_primary.into(), _color_secondary.into()]); } #[inline] pub fn get_vehicle_custom_primary_colour(_vehicle: i32, _r: &mut i32, _g: &mut i32, _b: &mut i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x1C2B9FEF, &[_vehicle.into(), _r.into(), _g.into(), _b.into()]); } #[inline] pub fn get_vehicle_custom_secondary_colour(_vehicle: i32, _r: &mut i32, _g: &mut i32, _b: &mut i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x3FF247A2, &[_vehicle.into(), _r.into(), _g.into(), _b.into()]); } #[inline] pub fn get_vehicle_dashboard_colour(_vehicle: i32, _color: &mut i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xA0DBD08D, &[_vehicle.into(), _color.into()]); } #[inline] pub fn get_vehicle_dirt_level(_vehicle: i32) -> f32 { cfx_core::invoker::invoke(0xFD15C065, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_doors_locked_for_player(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0x1DC50247, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_door_lock_status(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0xD72CEF2, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_door_status(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0x6E35C49C, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_engine_health(_vehicle: i32) -> f32 { cfx_core::invoker::invoke(0x8880038A, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_extra_colours(_vehicle: i32, _pearlescent_color: &mut i32, _wheel_color: &mut i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x80E4659B, &[_vehicle.into(), _pearlescent_color.into(), _wheel_color.into()]); } #[inline] pub fn get_vehicle_flight_nozzle_position(_vehicle: i32) -> f32 { cfx_core::invoker::invoke(0xAD40AD55, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_handbrake(_vehicle: i32) -> bool { cfx_core::invoker::invoke(0x483B013C, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_headlights_colour(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0xD7147656, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_homing_lockon_state(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0xFBDE9FD8, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_interior_colour(_vehicle: i32, _color: &mut i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xCCFF3B6E, &[_vehicle.into(), _color.into()]); } #[inline] pub fn get_vehicle_lights_state(_vehicle: i32, _lights_on: &mut bool, _highbeams_on: &mut bool) -> bool { cfx_core::invoker::invoke(0x7C278621, &[_vehicle.into(), _lights_on.into(), _highbeams_on.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_livery(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0xEC82A51D, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_lock_on_target(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0x4A557117, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_number_plate_text(_vehicle: i32) -> Option<String> { cfx_core::invoker::invoke(0xE8522D58, &[_vehicle.into()]).ok() } #[inline] pub fn get_vehicle_number_plate_text_index(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0x499747B6, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_ped_is_in(_ped: i32, _last_vehicle: bool) -> i32 { cfx_core::invoker::invoke(0xAFE92319, &[_ped.into(), _last_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_petrol_tank_health(_vehicle: i32) -> f32 { cfx_core::invoker::invoke(0xE41595CE, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_radio_station_index(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0x57037960, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_roof_livery(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0x872CF42, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_tyre_smoke_color(_vehicle: i32, _r: &mut i32, _g: &mut i32, _b: &mut i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x75280015, &[_vehicle.into(), _r.into(), _g.into(), _b.into()]); } #[inline] pub fn get_vehicle_wheel_type(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0xDA58D7AE, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn get_vehicle_window_tint(_vehicle: i32) -> i32 { cfx_core::invoker::invoke(0x13D53892, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn give_weapon_component_to_ped(_ped: i32, _weapon_hash: i32, _component_hash: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x3E1E286D, &[_ped.into(), _weapon_hash.into(), _component_hash.into()]); } #[inline] pub fn give_weapon_to_ped(_ped: i32, _weapon_hash: i32, _ammo_count: i32, _is_hidden: bool, _b_force_in_hand: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xC4D88A85, &[_ped.into(), _weapon_hash.into(), _ammo_count.into(), _is_hidden.into(), _b_force_in_hand.into()]); } #[inline] pub fn has_entity_been_marked_as_no_longer_needed(_vehicle: i32) -> bool { cfx_core::invoker::invoke(0x9C9A3BE0, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn has_vehicle_been_owned_by_player(_vehicle: i32) -> bool { cfx_core::invoker::invoke(0xE4E83A5B, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn invoke_function_reference(_reference_identity: impl cfx_core::types::AsCharPtr, _args_serialized: impl cfx_core::types::AsCharPtr, _args_length: i32, _retval_length: &mut i32) -> Option<String> { cfx_core::invoker::invoke(0xE3551879, &[_reference_identity.as_char_ptr().into(), _args_serialized.as_char_ptr().into(), _args_length.into(), _retval_length.into()]).ok() } #[inline] pub fn is_ace_allowed(_object: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0x7EBB9929, &[_object.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn is_duplicity_version() -> bool { cfx_core::invoker::invoke(0xCF24C52E, &[]).unwrap_or_default() } #[inline] pub fn is_entity_visible(_entity: i32) -> bool { cfx_core::invoker::invoke(0x120B4ED5, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn is_ped_a_player(_ped: i32) -> bool { cfx_core::invoker::invoke(0x404794CA, &[_ped.into()]).unwrap_or_default() } #[inline] pub fn is_player_ace_allowed(_player_src: impl cfx_core::types::AsCharPtr, _object: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0xDEDAE23D, &[_player_src.as_char_ptr().into(), _object.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn is_player_commerce_info_loaded(_player_src: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0xBEFE93F4, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn is_player_commerce_info_loaded_ext(_player_src: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0x1D14F4FE, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn is_player_evading_wanted_level(_player_src: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0x89A3881A, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn is_player_using_super_jump(_player_src: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0xC7D2C20C, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn is_principal_ace_allowed(_principal: impl cfx_core::types::AsCharPtr, _object: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0x37CF52CE, &[_principal.as_char_ptr().into(), _object.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn is_vehicle_engine_starting(_vehicle: i32) -> bool { cfx_core::invoker::invoke(0xBB340D04, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn is_vehicle_extra_turned_on(_vehicle: i32, _extra_id: i32) -> bool { cfx_core::invoker::invoke(0x42098B5, &[_vehicle.into(), _extra_id.into()]).unwrap_or_default() } #[inline] pub fn is_vehicle_siren_on(_vehicle: i32) -> bool { cfx_core::invoker::invoke(0x25EB5873, &[_vehicle.into()]).unwrap_or_default() } #[inline] pub fn is_vehicle_tyre_burst(_vehicle: i32, _wheel_id: i32, _completely: bool) -> bool { cfx_core::invoker::invoke(0x48C80210, &[_vehicle.into(), _wheel_id.into(), _completely.into()]).unwrap_or_default() } #[inline] pub fn load_player_commerce_data(_player_src: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xA8F63EAB, &[_player_src.as_char_ptr().into()]); } #[inline] pub fn load_player_commerce_data_ext(_player_src: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x7995539E, &[_player_src.as_char_ptr().into()]); } #[inline] pub fn load_resource_file(_resource_name: impl cfx_core::types::AsCharPtr, _file_name: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0x76A9EE1F, &[_resource_name.as_char_ptr().into(), _file_name.as_char_ptr().into()]).ok() } #[inline] pub fn mumble_create_channel(_id: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x262663C5, &[_id.into()]); } #[inline] pub fn network_get_entity_from_network_id(_net_id: i32) -> i32 { cfx_core::invoker::invoke(0x5B912C3F, &[_net_id.into()]).unwrap_or_default() } #[inline] pub fn network_get_entity_owner(_entity: i32) -> i32 { cfx_core::invoker::invoke(0x526FEE31, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn network_get_first_entity_owner(_entity: i32) -> i32 { cfx_core::invoker::invoke(0x1E546224, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn network_get_network_id_from_entity(_entity: i32) -> i32 { cfx_core::invoker::invoke(0x9E35DAB6, &[_entity.into()]).unwrap_or_default() } #[inline] pub fn network_get_voice_proximity_override(_player_src: impl cfx_core::types::AsCharPtr) -> cfx_core::types::Vector3 { cfx_core::invoker::invoke(0x7A6462F4, &[_player_src.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn perform_http_request_internal(_request_data: impl cfx_core::types::AsCharPtr, _request_data_length: i32) -> i32 { cfx_core::invoker::invoke(0x8E8CC653, &[_request_data.as_char_ptr().into(), _request_data_length.into()]).unwrap_or_default() } #[inline] pub fn profiler_enter_scope(_scope_name: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xC795A4A9, &[_scope_name.as_char_ptr().into()]); } #[inline] pub fn profiler_exit_scope() -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xB39CA35C, &[]); } #[inline] pub fn profiler_is_recording() -> bool { cfx_core::invoker::invoke(0xF8B7D7BB, &[]).unwrap_or_default() } #[inline] pub fn register_command(_command_name: impl cfx_core::types::AsCharPtr, _handler: cfx_core::ref_funcs::RefFunction, _restricted: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x5FA79B0F, &[_command_name.as_char_ptr().into(), _handler.into(), _restricted.into()]); } #[inline] pub fn register_console_listener(_listener: cfx_core::ref_funcs::RefFunction) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x281B5448, &[_listener.into()]); } #[inline] pub fn register_resource_asset(_resource_name: impl cfx_core::types::AsCharPtr, _file_name: impl cfx_core::types::AsCharPtr) -> Option<String> { cfx_core::invoker::invoke(0x9862B266, &[_resource_name.as_char_ptr().into(), _file_name.as_char_ptr().into()]).ok() } #[inline] pub fn register_resource_as_event_handler(_event_name: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xD233A168, &[_event_name.as_char_ptr().into()]); } #[inline] pub fn register_resource_build_task_factory(_factory_id: impl cfx_core::types::AsCharPtr, _factory_fn: cfx_core::ref_funcs::RefFunction) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x285B43CA, &[_factory_id.as_char_ptr().into(), _factory_fn.into()]); } #[inline] pub fn remove_all_ped_weapons(_ped: i32, _p_1: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xA44CE817, &[_ped.into(), _p_1.into()]); } #[inline] pub fn remove_blip(_blip: &mut i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xD8C3C1CD, &[_blip.into()]); } #[inline] pub fn remove_weapon_component_from_ped(_ped: i32, _weapon_hash: i32, _component_hash: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x412AA00D, &[_ped.into(), _weapon_hash.into(), _component_hash.into()]); } #[inline] pub fn remove_weapon_from_ped(_ped: i32, _weapon_hash: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x9C37F220, &[_ped.into(), _weapon_hash.into()]); } #[inline] pub fn request_player_commerce_session(_player_src: impl cfx_core::types::AsCharPtr, _sku_id: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x96F93CCE, &[_player_src.as_char_ptr().into(), _sku_id.into()]); } #[inline] pub fn save_resource_file(_resource_name: impl cfx_core::types::AsCharPtr, _file_name: impl cfx_core::types::AsCharPtr, _data: impl cfx_core::types::AsCharPtr, _data_length: i32) -> bool { cfx_core::invoker::invoke(0xA09E7E7B, &[_resource_name.as_char_ptr().into(), _file_name.as_char_ptr().into(), _data.as_char_ptr().into(), _data_length.into()]).unwrap_or_default() } #[inline] pub fn schedule_resource_tick(_resource_name: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xB88A73AD, &[_resource_name.as_char_ptr().into()]); } #[inline] pub fn set_blip_sprite(_blip: i32, _sprite_id: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x8DBBB0B9, &[_blip.into(), _sprite_id.into()]); } #[inline] pub fn set_convar(_var_name: impl cfx_core::types::AsCharPtr, _value: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x341B16D2, &[_var_name.as_char_ptr().into(), _value.as_char_ptr().into()]); } #[inline] pub fn set_convar_replicated(_var_name: impl cfx_core::types::AsCharPtr, _value: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xF292858C, &[_var_name.as_char_ptr().into(), _value.as_char_ptr().into()]); } #[inline] pub fn set_convar_server_info(_var_name: impl cfx_core::types::AsCharPtr, _value: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x9338D547, &[_var_name.as_char_ptr().into(), _value.as_char_ptr().into()]); } #[inline] pub fn set_current_ped_weapon(_ped: i32, _weapon_hash: i32, _equip_now: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xB8278882, &[_ped.into(), _weapon_hash.into(), _equip_now.into()]); } #[inline] pub fn set_entity_coords(_entity: i32, _x_pos: f32, _y_pos: f32, _z_pos: f32, _alive: bool, _dead_flag: bool, _ragdoll_flag: bool, _clear_area: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xDF70B41B, &[_entity.into(), _x_pos.into(), _y_pos.into(), _z_pos.into(), _alive.into(), _dead_flag.into(), _ragdoll_flag.into(), _clear_area.into()]); } #[inline] pub fn set_entity_distance_culling_radius(_entity: i32, _radius: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xD3A183A3, &[_entity.into(), _radius.into()]); } #[inline] pub fn set_entity_heading(_entity: i32, _heading: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xE0FF064D, &[_entity.into(), _heading.into()]); } #[inline] pub fn set_entity_rotation(_entity: i32, _pitch: f32, _roll: f32, _yaw: f32, _rotation_order: i32, _p_5: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xA345EFE, &[_entity.into(), _pitch.into(), _roll.into(), _yaw.into(), _rotation_order.into(), _p_5.into()]); } #[inline] pub fn set_entity_routing_bucket(_entity: i32, _bucket: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x635E5289, &[_entity.into(), _bucket.into()]); } #[inline] pub fn set_entity_velocity(_entity: i32, _x: f32, _y: f32, _z: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xFF5A1988, &[_entity.into(), _x.into(), _y.into(), _z.into()]); } #[inline] pub fn set_game_type(_gametype_name: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xF90B7469, &[_gametype_name.as_char_ptr().into()]); } #[inline] pub fn set_http_handler(_handler: cfx_core::ref_funcs::RefFunction) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xF5C6330C, &[_handler.into()]); } #[inline] pub fn set_map_name(_map_name: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xB7BA82DC, &[_map_name.as_char_ptr().into()]); } #[inline] pub fn set_ped_ammo(_ped: i32, _weapon_hash: i32, _ammo: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xBF90DF1A, &[_ped.into(), _weapon_hash.into(), _ammo.into()]); } #[inline] pub fn set_ped_armour(_ped: i32, _amount: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x4E3A0CC4, &[_ped.into(), _amount.into()]); } #[inline] pub fn set_ped_can_ragdoll(_ped: i32, _toggle: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xCF1384C4, &[_ped.into(), _toggle.into()]); } #[inline] pub fn set_ped_component_variation(_ped: i32, _component_id: i32, _drawable_id: i32, _texture_id: i32, _palette_id: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xD4F7B05C, &[_ped.into(), _component_id.into(), _drawable_id.into(), _texture_id.into(), _palette_id.into()]); } #[inline] pub fn set_ped_config_flag(_ped: i32, _flag_id: i32, _value: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x9CFBE10D, &[_ped.into(), _flag_id.into(), _value.into()]); } #[inline] pub fn set_ped_default_component_variation(_ped: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xC866A984, &[_ped.into()]); } #[inline] pub fn set_ped_head_blend_data(_ped: i32, _shape_first_id: i32, _shape_second_id: i32, _shape_third_id: i32, _skin_first_id: i32, _skin_second_id: i32, _skin_third_id: i32, _shape_mix: f32, _skin_mix: f32, _third_mix: f32, _is_parent: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x60746B88, &[_ped.into(), _shape_first_id.into(), _shape_second_id.into(), _shape_third_id.into(), _skin_first_id.into(), _skin_second_id.into(), _skin_third_id.into(), _shape_mix.into(), _skin_mix.into(), _third_mix.into(), _is_parent.into()]); } #[inline] pub fn set_ped_head_overlay(_ped: i32, _overlay_id: i32, _index: i32, _opacity: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xD28DBA90, &[_ped.into(), _overlay_id.into(), _index.into(), _opacity.into()]); } #[inline] pub fn set_ped_into_vehicle(_ped: i32, _vehicle: i32, _seat_index: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x7500C79, &[_ped.into(), _vehicle.into(), _seat_index.into()]); } #[inline] pub fn set_ped_prop_index(_ped: i32, _component_id: i32, _drawable_id: i32, _texture_id: i32, _attach: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x829F2E2, &[_ped.into(), _component_id.into(), _drawable_id.into(), _texture_id.into(), _attach.into()]); } #[inline] pub fn set_ped_random_component_variation(_ped: i32, _p_1: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x4111BA46, &[_ped.into(), _p_1.into()]); } #[inline] pub fn set_ped_random_props(_ped: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xE3318E0E, &[_ped.into()]); } #[inline] pub fn set_ped_reset_flag(_ped: i32, _flag_id: i32, _do_reset: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xCFF6FF66, &[_ped.into(), _flag_id.into(), _do_reset.into()]); } #[inline] pub fn set_ped_to_ragdoll(_ped: i32, _time_1: i32, _time_2: i32, _ragdoll_type: i32, _p_4: bool, _p_5: bool, _p_6: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x83CB5052, &[_ped.into(), _time_1.into(), _time_2.into(), _ragdoll_type.into(), _p_4.into(), _p_5.into(), _p_6.into()]); } #[inline] pub fn set_ped_to_ragdoll_with_fall(_ped: i32, _time: i32, _p_2: i32, _ragdoll_type: i32, _x: f32, _y: f32, _z: f32, _p_7: f32, _p_8: f32, _p_9: f32, _p_10: f32, _p_11: f32, _p_12: f32, _p_13: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xFA12E286, &[_ped.into(), _time.into(), _p_2.into(), _ragdoll_type.into(), _x.into(), _y.into(), _z.into(), _p_7.into(), _p_8.into(), _p_9.into(), _p_10.into(), _p_11.into(), _p_12.into(), _p_13.into()]); } #[inline] pub fn set_player_control(_player: impl cfx_core::types::AsCharPtr, _b_has_control: bool, _flags: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xD17AFCD8, &[_player.as_char_ptr().into(), _b_has_control.into(), _flags.into()]); } #[inline] pub fn set_player_culling_radius(_player_src: impl cfx_core::types::AsCharPtr, _radius: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x8A2FBAD4, &[_player_src.as_char_ptr().into(), _radius.into()]); } #[inline] pub fn set_player_invincible(_player: impl cfx_core::types::AsCharPtr, _toggle: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xDFB9A2A2, &[_player.as_char_ptr().into(), _toggle.into()]); } #[inline] pub fn set_player_model(_player: impl cfx_core::types::AsCharPtr, _model: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x774A4C54, &[_player.as_char_ptr().into(), _model.into()]); } #[inline] pub fn set_player_routing_bucket(_player_src: impl cfx_core::types::AsCharPtr, _bucket: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x6504EB38, &[_player_src.as_char_ptr().into(), _bucket.into()]); } #[inline] pub fn set_player_wanted_level(_player: impl cfx_core::types::AsCharPtr, _wanted_level: i32, _disable_no_mission: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xB7A0914B, &[_player.as_char_ptr().into(), _wanted_level.into(), _disable_no_mission.into()]); } #[inline] pub fn set_resource_kvp(_key: impl cfx_core::types::AsCharPtr, _value: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x21C7A35B, &[_key.as_char_ptr().into(), _value.as_char_ptr().into()]); } #[inline] pub fn set_resource_kvp_float(_key: impl cfx_core::types::AsCharPtr, _value: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x9ADD2938, &[_key.as_char_ptr().into(), _value.into()]); } #[inline] pub fn set_resource_kvp_int(_key: impl cfx_core::types::AsCharPtr, _value: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x6A2B1E8, &[_key.as_char_ptr().into(), _value.into()]); } #[inline] pub fn set_routing_bucket_entity_lockdown_mode(_bucket_id: i32, _mode: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xA0F2201F, &[_bucket_id.into(), _mode.as_char_ptr().into()]); } #[inline] pub fn set_routing_bucket_population_enabled(_bucket_id: i32, _mode: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xCE51AC2C, &[_bucket_id.into(), _mode.into()]); } #[inline] pub fn set_state_bag_value(_bag_name: impl cfx_core::types::AsCharPtr, _key_name: impl cfx_core::types::AsCharPtr, _value_data: impl cfx_core::types::AsCharPtr, _value_length: i32, _replicated: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x8D50E33A, &[_bag_name.as_char_ptr().into(), _key_name.as_char_ptr().into(), _value_data.as_char_ptr().into(), _value_length.into(), _replicated.into()]); } #[inline] pub fn set_vehicle_alarm(_vehicle: i32, _state: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x24877D84, &[_vehicle.into(), _state.into()]); } #[inline] pub fn set_vehicle_body_health(_vehicle: i32, _value: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x920C2517, &[_vehicle.into(), _value.into()]); } #[inline] pub fn set_vehicle_colours(_vehicle: i32, _color_primary: i32, _color_secondary: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x57F24253, &[_vehicle.into(), _color_primary.into(), _color_secondary.into()]); } #[inline] pub fn set_vehicle_colour_combination(_vehicle: i32, _color_combination: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xA557AEAD, &[_vehicle.into(), _color_combination.into()]); } #[inline] pub fn set_vehicle_custom_primary_colour(_vehicle: i32, _r: i32, _g: i32, _b: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x8DF9F9BC, &[_vehicle.into(), _r.into(), _g.into(), _b.into()]); } #[inline] pub fn set_vehicle_custom_secondary_colour(_vehicle: i32, _r: i32, _g: i32, _b: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x9D77259E, &[_vehicle.into(), _r.into(), _g.into(), _b.into()]); } #[inline] pub fn set_vehicle_dirt_level(_vehicle: i32, _dirt_level: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x2B39128B, &[_vehicle.into(), _dirt_level.into()]); } #[inline] pub fn set_vehicle_doors_locked(_vehicle: i32, _door_lock_status: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x4CDD35D0, &[_vehicle.into(), _door_lock_status.into()]); } #[inline] pub fn set_vehicle_door_broken(_vehicle: i32, _door_index: i32, _delete_door: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x8147FEA7, &[_vehicle.into(), _door_index.into(), _delete_door.into()]); } #[inline] pub fn set_vehicle_number_plate_text(_vehicle: i32, _plate_text: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x400F9556, &[_vehicle.into(), _plate_text.as_char_ptr().into()]); } #[inline] pub fn start_find_kvp(_prefix: impl cfx_core::types::AsCharPtr) -> i32 { cfx_core::invoker::invoke(0xDD379006, &[_prefix.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn start_resource(_resource_name: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0x29B440DC, &[_resource_name.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn stop_resource(_resource_name: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0x21783161, &[_resource_name.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn task_combat_ped(_ped: i32, _target_ped: i32, _p_2: i32, _p_3: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xCB0D8932, &[_ped.into(), _target_ped.into(), _p_2.into(), _p_3.into()]); } #[inline] pub fn task_drive_by(_driver_ped: i32, _target_ped: i32, _target_vehicle: i32, _target_x: f32, _target_y: f32, _target_z: f32, _distance_to_shoot: f32, _ped_accuracy: i32, _p_8: bool, _firing_pattern: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x2B84D1C4, &[_driver_ped.into(), _target_ped.into(), _target_vehicle.into(), _target_x.into(), _target_y.into(), _target_z.into(), _distance_to_shoot.into(), _ped_accuracy.into(), _p_8.into(), _firing_pattern.into()]); } #[inline] pub fn task_enter_vehicle(_ped: i32, _vehicle: i32, _timeout: i32, _seat: i32, _speed: f32, _flag: i32, _p_6: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xB8689B4E, &[_ped.into(), _vehicle.into(), _timeout.into(), _seat.into(), _speed.into(), _flag.into(), _p_6.into()]); } #[inline] pub fn task_everyone_leave_vehicle(_vehicle: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xC1971F30, &[_vehicle.into()]); } #[inline] pub fn task_go_straight_to_coord(_ped: i32, _x: f32, _y: f32, _z: f32, _speed: f32, _timeout: i32, _target_heading: f32, _distance_to_slide: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x80A9E7A7, &[_ped.into(), _x.into(), _y.into(), _z.into(), _speed.into(), _timeout.into(), _target_heading.into(), _distance_to_slide.into()]); } #[inline] pub fn task_go_to_coord_any_means(_ped: i32, _x: f32, _y: f32, _z: f32, _speed: f32, _p_5: i32, _p_6: bool, _walking_style: i32, _p_8: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xF91DF93B, &[_ped.into(), _x.into(), _y.into(), _z.into(), _speed.into(), _p_5.into(), _p_6.into(), _walking_style.into(), _p_8.into()]); } #[inline] pub fn task_go_to_entity(_entity: i32, _target: i32, _duration: i32, _distance: f32, _speed: f32, _p_5: f32, _p_6: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x374827C2, &[_entity.into(), _target.into(), _duration.into(), _distance.into(), _speed.into(), _p_5.into(), _p_6.into()]); } #[inline] pub fn task_hands_up(_ped: i32, _duration: i32, _facing_ped: i32, _p_3: i32, _p_4: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x8DCC19C5, &[_ped.into(), _duration.into(), _facing_ped.into(), _p_3.into(), _p_4.into()]); } #[inline] pub fn task_leave_any_vehicle(_ped: i32, _p_1: i32, _flags: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xDBDD79FA, &[_ped.into(), _p_1.into(), _flags.into()]); } #[inline] pub fn task_leave_vehicle(_ped: i32, _vehicle: i32, _flags: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x7B1141C6, &[_ped.into(), _vehicle.into(), _flags.into()]); } #[inline] pub fn task_play_anim(_ped: i32, _anim_dictionary: impl cfx_core::types::AsCharPtr, _animation_name: impl cfx_core::types::AsCharPtr, _blend_in_speed: f32, _blend_out_speed: f32, _duration: i32, _flag: i32, _playback_rate: f32, _lock_x: bool, _lock_y: bool, _lock_z: bool) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x5AB552C6, &[_ped.into(), _anim_dictionary.as_char_ptr().into(), _animation_name.as_char_ptr().into(), _blend_in_speed.into(), _blend_out_speed.into(), _duration.into(), _flag.into(), _playback_rate.into(), _lock_x.into(), _lock_y.into(), _lock_z.into()]); } #[inline] pub fn task_play_anim_advanced(_ped: i32, _anim_dict: impl cfx_core::types::AsCharPtr, _anim_name: impl cfx_core::types::AsCharPtr, _pos_x: f32, _pos_y: f32, _pos_z: f32, _rot_x: f32, _rot_y: f32, _rot_z: f32, _anim_enter_speed: f32, _anim_exit_speed: f32, _duration: i32, _flag: i32, _anim_time: f32, _p_14: i32, _p_15: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x3DDEB0E6, &[_ped.into(), _anim_dict.as_char_ptr().into(), _anim_name.as_char_ptr().into(), _pos_x.into(), _pos_y.into(), _pos_z.into(), _rot_x.into(), _rot_y.into(), _rot_z.into(), _anim_enter_speed.into(), _anim_exit_speed.into(), _duration.into(), _flag.into(), _anim_time.into(), _p_14.into(), _p_15.into()]); } #[inline] pub fn task_react_and_flee_ped(_ped: i32, _flee_target: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x8A632BD8, &[_ped.into(), _flee_target.into()]); } #[inline] pub fn task_shoot_at_coord(_ped: i32, _x: f32, _y: f32, _z: f32, _duration: i32, _firing_pattern: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x601C22E3, &[_ped.into(), _x.into(), _y.into(), _z.into(), _duration.into(), _firing_pattern.into()]); } #[inline] pub fn task_shoot_at_entity(_entity: i32, _target: i32, _duration: i32, _firing_pattern: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xAC0631C9, &[_entity.into(), _target.into(), _duration.into(), _firing_pattern.into()]); } #[inline] pub fn task_warp_ped_into_vehicle(_ped: i32, _vehicle: i32, _seat: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x65D4A35D, &[_ped.into(), _vehicle.into(), _seat.into()]); } #[inline] pub fn temp_ban_player(_player_src: impl cfx_core::types::AsCharPtr, _reason: impl cfx_core::types::AsCharPtr) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x1E35DBBA, &[_player_src.as_char_ptr().into(), _reason.as_char_ptr().into()]); } #[inline] pub fn trigger_client_event_internal(_event_name: impl cfx_core::types::AsCharPtr, _event_target: impl cfx_core::types::AsCharPtr, _event_payload: impl cfx_core::types::AsCharPtr, _payload_length: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x2F7A49E6, &[_event_name.as_char_ptr().into(), _event_target.as_char_ptr().into(), _event_payload.as_char_ptr().into(), _payload_length.into()]); } #[inline] pub fn trigger_event_internal(_event_name: impl cfx_core::types::AsCharPtr, _event_payload: impl cfx_core::types::AsCharPtr, _payload_length: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x91310870, &[_event_name.as_char_ptr().into(), _event_payload.as_char_ptr().into(), _payload_length.into()]); } #[inline] pub fn trigger_latent_client_event_internal(_event_name: impl cfx_core::types::AsCharPtr, _event_target: impl cfx_core::types::AsCharPtr, _event_payload: impl cfx_core::types::AsCharPtr, _payload_length: i32, _bps: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x70B35890, &[_event_name.as_char_ptr().into(), _event_target.as_char_ptr().into(), _event_payload.as_char_ptr().into(), _payload_length.into(), _bps.into()]); } #[inline] pub fn verify_password_hash(_password: impl cfx_core::types::AsCharPtr, _hash: impl cfx_core::types::AsCharPtr) -> bool { cfx_core::invoker::invoke(0x2E310ACD, &[_password.as_char_ptr().into(), _hash.as_char_ptr().into()]).unwrap_or_default() } #[inline] pub fn was_event_canceled() -> bool { cfx_core::invoker::invoke(0x58382A19, &[]).unwrap_or_default() } #[inline] pub fn _add_blip_for_area(_x: f32, _y: f32, _z: f32, _width: f32, _height: f32) -> i32 { cfx_core::invoker::invoke(0x6228F159, &[_x.into(), _y.into(), _z.into(), _width.into(), _height.into()]).unwrap_or_default() } #[inline] pub fn _set_ped_eye_color(_ped: i32, _index: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xEC09DB1B, &[_ped.into(), _index.into()]); } #[inline] pub fn _set_ped_face_feature(_ped: i32, _index: i32, _scale: f32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x6C8D4458, &[_ped.into(), _index.into(), _scale.into()]); } #[inline] pub fn _set_ped_hair_color(_ped: i32, _color_id: i32, _highlight_color_id: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0xBB43F090, &[_ped.into(), _color_id.into(), _highlight_color_id.into()]); } #[inline] pub fn _set_ped_head_overlay_color(_ped: i32, _overlay_id: i32, _color_type: i32, _color_id: i32, _second_color_id: i32) -> () { let _ = cfx_core::invoker::invoke::<(), _>(0x497BF74A7B9CB952, &[_ped.into(), _overlay_id.into(), _color_type.into(), _color_id.into(), _second_color_id.into()]); } }