Skip to content

Instantly share code, notes, and snippets.

@BoYanZh
Last active June 23, 2024 05:17
Show Gist options
  • Save BoYanZh/044ce782ae3da39012d4b7d2edeabcd9 to your computer and use it in GitHub Desktop.
Save BoYanZh/044ce782ae3da39012d4b7d2edeabcd9 to your computer and use it in GitHub Desktop.
void function ActuallyPutDefaultSettings()
{
entity player = GetLocalClientPlayer()
//Hack, reusing convars for this sp gamemode. Default settings for the menu declared here.
SetConVarInt( "hud_setting_minimapRotate", 0 )
SetConVarInt( "hud_setting_accessibleChat", 3 )
SetConVarInt( "hud_setting_streamerMode", 1)
SetConVarInt( "hud_setting_showTips", 1 )
SetConVarInt( "hud_setting_compactOverHeadNames", 1 )
SetConVarInt( "hud_setting_showMeter", 0)
SetConVarInt( "hud_setting_showMedals", 0)
SetConVarInt( "hud_setting_showLevelUp", 2)
SetConVarInt( "net_minimumPacketLossDC", 2)
SetConVarInt( "net_wifi", 100)
SetConVarInt( "noise_filter_scale", 5)
WaitFrame() //idk?
//set default settings
player.ClientCommand("CC_AimTrainer_AI_SHIELDS_LEVEL " + GetConVarInt("hud_setting_minimapRotate").tostring())
player.ClientCommand("CC_AimTrainer_STRAFING_SPEED 1.35")
player.ClientCommand("CC_RGB_HUD " + GetConVarInt("hud_setting_showMeter").tostring())
player.ClientCommand("CC_AimTrainer_INFINITE_CHALLENGE " + GetConVarInt("hud_setting_showMedals").tostring())
player.ClientCommand("CC_AimTrainer_INFINITE_AMMO " + GetConVarInt("hud_setting_showTips").tostring())
player.ClientCommand("CC_AimTrainer_INFINITE_AMMO2 " + GetConVarInt("hud_setting_compactOverHeadNames").tostring())
player.ClientCommand("CC_AimTrainer_INMORTAL_TARGETS " + GetConVarInt("hud_setting_streamerMode").tostring())
player.ClientCommand("CC_AimTrainer_USER_WANNA_BE_A_DUMMY " + GetConVarInt("hud_setting_showLevelUp").tostring())
player.ClientCommand("CC_AimTrainer_SPAWN_DISTANCE " + GetConVarInt("net_minimumPacketLossDC").tostring())
player.ClientCommand("CC_AimTrainer_AI_HEALTH " + GetConVarInt("net_wifi").tostring())
player.ClientCommand("CC_AimTrainer_DUMMIES_COLOR " + GetConVarInt("noise_filter_scale").tostring())
player.ClientCommand("CC_MenuGiveAimTrainerWeapon mp_weapon_r97 p 1 3 3 3 smg 3 bullet")
player.ClientCommand("CC_MenuGiveAimTrainerWeapon mp_weapon_clickweapon s")
}
@BoYanZh
Copy link
Author

BoYanZh commented Jun 7, 2024

File path relative to your R5Reloaded installation path: platform\scripts\vscripts\gamemodes\fs_aimtrainer\cl_gamemode_aimtrainer.nut

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment