rehlds / ReGameDLL_CS

Enhanced server-side GameDLL for Counter-Strike 1.6 (and CS: Condition Zero), offering new features and fixes.
https://rehlds.dev/docs/regamedll-cs
GNU General Public License v3.0
589 stars 203 forks source link

Adding Cvars #233

Open skitaila03 opened 6 years ago

skitaila03 commented 6 years ago

I suggest to add new cvars for money controll like how cs go have it. I know this can be done with reapi hooking AddAccount but i think it can be more usefull if we have cvars for it. The value should be num or percent type like : 100 or -7% or +7% or 100+7%, value 0 = take default cvar value or disable the cvar Eg:

cash_player_killed_enemy 500 - set 500$ reward for killing an enemy cash_player_killed_enemy -100 - take 100$ usd for killing an enemy cash_player_killed_enemy +7% - increase reward with 7% cash_player_killed_enemy 7% + 500 - set initial reward + 7% of initial reward + extra 500

Cvars List: cash_player_killed_enemy (RT_ENEMY_KILLED) cash_player_killed_teammate (RT_TEAMMATES_KILLED) cash_player_killed_vip (RT_VIP_KILLED) cash_player_rescued_vip_myself (RT_VIP_RESCUED_MYSELF) cash_player_killed_hostage (RT_HOSTAGE_KILLED) cash_player_damage_hostage (RT_HOSTAGE_DAMAGED) cash_player_took_hostage (RT_HOSTAGE_TOOK) cash_player_rescued_hostage (RT_HOSTAGE_RESCUED) cash_player_into_game (RT_INTO_GAME) cash_player_join (RT_PLAYER_JOIN) cash_player_spec_join (RT_PLAYER_SPEC_JOIN) cash_player_bought_something (RT_PLAYER_BOUGHT_SOMETHING) cash_player_reset (RT_PLAYER_RESET) cash_player_round_bonus (RT_ROUND_BONUS) cash_player_bomb_defused
cash_player_bomb_planted cash_player_bomb_exploded
cash_player_respawn_amount 0 - if it is 0 use mp_startmoney cash_player_suicide 0

cash_team_terrorists_win (RR_TERRORISTS_WIN) cash_team_cts_win (RR_CTS_WIN) cash_team_target_bomb (RR_TARGET_BOMB) cash_team_vip_escaped (RR_VIP_ESCAPED) cash_team_vip_assasinated (RR_VIP_ASSASSINATED) cash_team_ts_escaped (RR_TERRORISTS_ESCAPED) cash_team_cts_prevent_escaped (RR_CTS_PREVENT_ESCAPE) cash_team_escaping_ts_neutralized (RR_ESCAPING_TERRORISTS_NEUTRALIZED) cash_team_bomb_defused (RR_BOMB_DEFUSED) cash_team_bomb_planted (RR_BOMB_PLANTED) cash_team_bomb_exploded (RR_BOMB_EXPLODED) cash_team_all_hostage_rescued (RR_ALL_HOSTAGES_RESCUED) cash_target_bomb_saved (RR_TARGET_BOMB_SAVED) cash_team_hostage_not_rescued (RR_HOSTAGE_NOT_RESCUED) cash_team_vip_not_escaped (RR_VIP_NOT_ESCAPED) cash_team_loser_bonus_default (RR_LOSER_BONUS_DEFAULT) cash_team_loser_bonus_min (RR_LOSER_BONUS_MIN) cash_team_loser_bonus_max (RR_LOSER_BONUS_MAX) cash_team_loser_bonus_add (RR_LOSER_BONUS_ADD) cash_team_hostage_rescued (RR_RESCUED_HOSTAGE) cash_team_hostage_took_acc (RR_TOOK_HOSTAGE_ACC) cash_team_took_hostage (RR_TOOK_HOSTAGE) cash_team_end (RR_END)

And if you can you can edit/add some cvars mp_free_armor 1/0 - Add armor on player spawn mp_pistol_drops 1/0 - Drop pistols on death mp_afk_bomb_drop 1/0 - Drop c4 if player is afk more than x seconds mp_afk_bomb_drop_time seconds mp_freeforall_cts 1/0 - FreeForAll only for CTs mp_freeforall_ts 1/0 - FreeForAll only for Ts mp_hegrenade_hurting_self 1/0 - Disable hurting himself with his grenade mp_limit_teams 1/0 // Limit the joining in one team mp_limit_teams_ts 1...max_players/0 = disabled // The maximum players for ts it is 1, nobody can join via vgui menu or jointeam mp_limit_teams_cts 1...max_players/0 = disabled // The maximum players for cs it is 1, nobody can join via vgui menu or jointeam

PS: Some cvars are inspired from cs:go

lespaul64 commented 6 years ago

Agreed with the money control cvars. Yes csgo has these cvars.

These 2 cvars also useful:

s1lentq commented 6 years ago

mp_limit_teams 1/0 // Limit the joning one team

What is the difference between mp_limit_teams and mp_limitteams?

ghost commented 6 years ago

nonsense

lespaul64 commented 6 years ago

@s1lentq I think he means the limit of changing team in round round, as we know default cs16 allow only 1 team change in a round. This is useful for gungame.

skitaila03 commented 6 years ago

@s1lentq As far i know mp_limitteams it is how many players can a team have over another. mp_limitteams 3 the team can have 3 players surplus What i had in mind was something like this: mp_limit_teams true/false mp_limit_teams_ts 4 mp_limit_teams_cts 5 If there are 4 players in ts team then the plugin should block joining anymore in this team and viceversa EG: Im spec and there are 4 players on ts team. I try to join but it doesn't work because the're are already 4 players (mp_limit_teams_ts 4) and viceversa and the mp_limitteams should be turned off if those cvars are used I think it is pointless to do something like this and make a cvar like @lespaul64 said to allow multiple team switch mp_switching_teams 0/1/2/3/4/5/6/-1 = infinite per round, this thing i think will be usefull. Thanks