use omp_codegen::native;
use crate::players::Player;
use std::ffi::c_void;
native!(Core_TickCount, -> i32);
native!(Core_MaxPlayers, -> i32);
native!(Core_Log, text: str, -> bool);
native!(Core_IsAdminTeleportAllowed, -> bool);
native!(Core_AllowAdminTeleport, allow: bool, -> bool);
native!(Core_AreAllAnimationsEnabled, -> bool);
native!(Core_EnableAllAnimations, allow: bool, -> bool);
native!(Core_IsAnimationLibraryValid, name: str, -> bool);
native!(Core_AreInteriorWeaponsAllowed, -> bool);
native!(Core_AllowInteriorWeapons, allow: bool, -> bool);
native!(Core_BlockIpAddress, ipAddress: str, timeMS: i32, -> bool);
native!(Core_UnBlockIpAddress, ipAddress: str, -> bool);
native!(Core_DisableEntryExitMarkers, -> bool);
native!(Core_DisableNameTagsLOS, -> bool);
native!(Core_EnableZoneNames, enable: bool, -> bool);
native!(Core_ShowGameTextForAll, msg: str, time: i32, style: i32, -> bool);
native!(Core_HideGameTextForAll, style: i32, -> bool);
native!(Core_NetworkStats, output: mut str,output_len: usize, -> i32);
native!(Core_ServerTickRate, -> i32);
native!(Core_GetWeaponName, weaponid: i32, output: mut str,output_len: usize, -> bool);
native!(Core_SetChatRadius, globalChatRadius: f32, -> bool);
native!(Core_SetMarkerRadius, playerMarkerRadius: f32, -> bool);
native!(Core_SendRconCommand, command: str, -> bool);
native!(Core_SetDeathDropAmount, amount: i32, -> bool);
native!(Core_GameMode_SetText, string: str, -> bool);
native!(Core_SetGravity, gravity: f32, -> bool);
native!(Core_GetGravity, -> f32);
native!(Core_SetNameTagsDrawDistance, distance: f32, -> bool);
native!(Core_SetWeather, weatherid: i32, -> bool);
native!(Core_SetWorldTime, hour: i32, -> bool);
native!(Core_ShowNameTags, show: bool, -> bool);
native!(Core_ShowPlayerMarkers, mode: i32, -> bool);
native!(Core_UsePedAnims, -> bool);
native!(Core_GetWeather, -> i32);
native!(Core_GetWorldTime, -> i32);
native!(Core_ToggleChatTextReplacement, enable: bool, -> bool);
native!(Core_IsChatTextReplacementToggled, -> bool);
native!(Core_IsNickNameValid, name: str, -> bool);
native!(Core_AllowNickNameCharacter, character: i32, allow: bool, -> bool);
native!(Core_IsNickNameCharacterAllowed, character: i32, -> bool);
native!(Core_ClearBanList, -> bool);
native!(Core_IsIpAddressBanned, ip: str, -> bool);
native!(Core_GetWeaponSlot, weapon: u8, -> i32);
native!(Core_AddRule, name: str, value: str, -> bool);
native!(Core_IsValidRule, name: str, -> bool);
native!(Core_RemoveRule, name: str, -> bool);
native!(All_SendClientMessage, color: u32, text: str, -> bool);
native!(All_CreateExplosion, x: f32, y: f32, z: f32, expolsion_type: i32, radius: f32, -> bool);
native!(All_SendDeathMessage, killer: struct Player, killee: struct Player, weapon: i32, -> bool);
native!(All_EnableStuntBonus, enable: bool, -> bool);
#[doc(hidden)]
pub fn load_functions() {
load_function!(Core_TickCount);
load_function!(Core_MaxPlayers);
load_function!(Core_Log);
load_function!(Core_IsAdminTeleportAllowed);
load_function!(Core_AllowAdminTeleport);
load_function!(Core_AreAllAnimationsEnabled);
load_function!(Core_EnableAllAnimations);
load_function!(Core_IsAnimationLibraryValid);
load_function!(Core_AreInteriorWeaponsAllowed);
load_function!(Core_AllowInteriorWeapons);
load_function!(Core_BlockIpAddress);
load_function!(Core_UnBlockIpAddress);
load_function!(Core_DisableEntryExitMarkers);
load_function!(Core_DisableNameTagsLOS);
load_function!(Core_EnableZoneNames);
load_function!(Core_ShowGameTextForAll);
load_function!(Core_HideGameTextForAll);
load_function!(Core_NetworkStats);
load_function!(Core_ServerTickRate);
load_function!(Core_GetWeaponName);
load_function!(Core_SetChatRadius);
load_function!(Core_SetMarkerRadius);
load_function!(Core_SendRconCommand);
load_function!(Core_SetDeathDropAmount);
load_function!(Core_GameMode_SetText);
load_function!(Core_SetGravity);
load_function!(Core_GetGravity);
load_function!(Core_SetNameTagsDrawDistance);
load_function!(Core_SetWeather);
load_function!(Core_SetWorldTime);
load_function!(Core_ShowNameTags);
load_function!(Core_ShowPlayerMarkers);
load_function!(Core_UsePedAnims);
load_function!(Core_GetWeather);
load_function!(Core_GetWorldTime);
load_function!(Core_ToggleChatTextReplacement);
load_function!(Core_IsChatTextReplacementToggled);
load_function!(Core_IsNickNameValid);
load_function!(Core_AllowNickNameCharacter);
load_function!(Core_IsNickNameCharacterAllowed);
load_function!(Core_ClearBanList);
load_function!(Core_IsIpAddressBanned);
load_function!(Core_GetWeaponSlot);
load_function!(Core_AddRule);
load_function!(Core_IsValidRule);
load_function!(Core_RemoveRule);
load_function!(All_SendClientMessage);
load_function!(All_CreateExplosion);
load_function!(All_SendDeathMessage);
load_function!(All_EnableStuntBonus);
}