Skip to content

Commit

Permalink
AQS v7.9
Browse files Browse the repository at this point in the history
- Optimize the code using `find_player_ex()` calls where possible
- Update the team retrieval method in mods like `Natural Selection` (NS)
- Allow more settings to be customized via the configuration file
- Add more details into the file
- Improve the weapon detection on games using the `DeathMsg` message inside the `QS_FM_OnWriteString_POST()` forward
  • Loading branch information
ClaudiuHKS committed Dec 25, 2023
1 parent 067c89a commit 28b7e92
Show file tree
Hide file tree
Showing 2 changed files with 574 additions and 289 deletions.
125 changes: 80 additions & 45 deletions AQS.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
/// IN WINDOWS, TALKING ABOUT FILE NAMES, 'one.wav' AND 'ONE.WAV' ARE SAME. IN LINUX AND PROBABLY OTHER SYSTEMS,
/// 'one.wav' AND 'ONE.WAV' CAN BE BOTH INTO THE SAME FOLDER, AS DIFFERENT FILES. SO, TAKE CARE ABOUT THE SOUND FILE NAMES,
/// IF YOUR GAME SERVER IS ON LINUX.
///
/// CONFIG VERSION: AQS 7.9
//

# ENABLES OR DISABLES THE PLUGIN.
Expand All @@ -21,10 +23,24 @@ ENABLE/ DISABLE PLUGIN = 1
#
ENABLE/ DISABLE CHAT = 1

# THE CHAT COMMAND(S) SEPARATED BY SEMICOLON (;).
#
# CASE INSENSITIVE [ s = S & S = s ].
#
# DO NOT ADD TOO MANY. MIGHT NEGATIVELY ALTER THE PERFORMANCE. WE RECOMMEND AT MOST 4, 6 OR 8.
#
# DO NOT ADD "sounds" (WITHOUT QUOTES). IT WILL BE TRIGGERED (THE COMMAND) IF SOMEONE TYPES "sounds nice".
#
# MAY ALSO USE SPECIAL CHARACTERS SUCH â, з, ğ, 語, س, औ.
#
# DEFAULT: .sounds ; /sounds ; ,sounds ; !sounds
#
CHAT COMMANDS = .sounds ; /sounds ; ,sounds ; !sounds

# ENABLES OR DISABLES THE '/SOUNDS' CHAT INFORMATION AFTER THE PLAYER HAS JOINED THE GAME SERVER.
#
ENABLE/ DISABLE JOIN = 1
JOIN DELAY SECONDS = 6.000000 # IF ENABLED, AFTER THE PLAYER HAS JOINED WAIT THIS MANY SECONDS BEFORE PRINTING OUT THE INFORMATION ( DEF 6.000000 )
JOIN DELAY SECONDS = 6.000000 # IF ENABLED, AFTER THE PLAYER HAS JOINED WAIT THIS MANY SECONDS BEFORE PRINTING OUT THE INFORMATION ( DEF 6.000000 ).

# WHEN ENABLED, DO NOT SHOW THE CHAT '/SOUNDS' INFORMATION ANYMORE IF IT HAS ALREADY BEEN SHOWN TO THAT STEAM.
#
Expand All @@ -41,6 +57,18 @@ SKIP EXISTING INFO = 1
#
HIDE CHAT CMD = 0

#
# THE TEAM RETRIEVAL METHOD.
#
# IF YOU'RE HAVING PROBLEMS WITH THE TEAM KILL EVENT (MAYBE 'NATURAL SELECTION' OR ANY OTHER RARE GAME MOD), CHANGE THIS TO 1.
#
# 0 = AMX MOD X ( get_user_team ) => get_user_team(nPlayer, szTeamName, charsmax(szTeamName)) METHOD.
# 1 = FAKE META ( pev_team ) => pev(nPlayer, pev_team) METHOD.
#
# DEFAULT: 0
#
TEAM RETRIEVAL = 0

# HUD MESSAGES IN RGB [ RED, GREEN, BLUE ].
#
# USE UNDERLINE FOR RANDOM VALUE. THE UNDERLINE IS '_' ( WITHOUT QUOTES ).
Expand All @@ -54,8 +82,8 @@ HUDMSG BLUE = _

# ENABLES OR DISABLES THE SQL STORAGE STUFF.
#
# 1 = SQL PER STEAM PLAYER PREFERENCES STORAGE ON
# 0 = SQL PER STEAM PLAYER PREFERENCES STORAGE OFF
# 1 = SQL PER STEAM PLAYER PREFERENCES STORAGE ON.
# 0 = SQL PER STEAM PLAYER PREFERENCES STORAGE OFF.
#
# USING SQL MAY RAISE UP RAM ( MEMORY ) USAGE AND SOME GAME HOSTING COMPANIES MAY RESTRICT TOO MUCH MEMORY USAGE.
# IF YOUR GAME SERVER RANDOMLY CRASHES AND YOU THINK YOUR GAME HOSTING COMPANY MAY LIMIT YOUR GAME SERVER MEMORY USAGE, TURN THIS OFF.
Expand All @@ -66,8 +94,8 @@ SQL ON/ OFF = 1

# SQL FULL OR FAST STEAM STORAGE.
#
# 1 = FULL "STEAM_X:Y:ZZZ"
# 0 = FAST "ZZZ"
# 1 = FULL "STEAM_X:Y:ZZZ" FORMAT.
# 0 = FAST "ZZZ" FORMAT.
#
# IF YOUR STEAM IS "STEAM_0:0:36120359" BUT SOMETIMES THE GAME SERVER IS SAYING THAT YOUR STEAM IS "STEAM_0:1:36120359", "STEAM_1:1:36120359"
# OR "STEAM_1:0:36120359", USE 0.
Expand Down Expand Up @@ -126,9 +154,9 @@ SQL DATABASE = aqs

# SQL EXTENSION TO USE.
#
# mysql [ REMOTE ( NEEDS ADDRESS, USER NAME & PASSWORD ) ]
# mysql [ REMOTE ( NEEDS ADDRESS, USER NAME & PASSWORD ) ].
#
# sqlite [ LOCAL ( THE DATABASE NAME IS A FILE NAME STORED ON THE GAME SERVER ) ]
# sqlite [ LOCAL ( THE DATABASE NAME IS A FILE NAME STORED ON THE GAME SERVER ) ].
#
# DEFAULT = sqlite
#
Expand All @@ -138,7 +166,7 @@ SQL EXTENSION = sqlite
#
# SECONDS TO WAIT BEFORE ABORTING AN UNRESPONSIVE CONNECTION. ONLY USED IN MYSQL.
#
# 0 = USE THE DEFAULT VALUE OF 60 SECONDS ( SEE THE "CORE.INI" CONFIG FILE )
# 0 = USE THE DEFAULT VALUE OF 60 SECONDS ( SEE THE "CORE.INI" CONFIG FILE ).
#
# DEFAULT = 0
#
Expand Down Expand Up @@ -271,7 +299,7 @@ SOUND = 27 MESSAGE @ %s IS G O D L I K E !!!
# YES, YOU CAN HAVE ONLY '3' SOUNDS IF YOU WANT, FOR EXAMPLE. THEY WILL BE 'SOUND = 1', 'SOUND = 2' AND 'SOUND = 3'.
#

# HEADSHOT
# HEADSHOT.
#
# THE HUD MESSAGE STRUCTURE IS "%s {MESSAGE} %s {MESSAGE}", WHERE THE FIRST '%s' IS THE KILLER NAME AND THE NEXT '%s' IS THE VICTIM NAME.
# EXAMPLE OF HUD MESSAGE FOR HEADSHOT: "%s REMOVED %s's HEAD!" ( WITHOUT QUOTES ).
Expand All @@ -285,35 +313,35 @@ HEADSHOT ONLY KILLER = 1
HEADSHOT SOUNDS = AQS/headshot.wav , AQS/headshot2.wav , AQS/headshot3.wav , AQS/headshot4.wav
HEADSHOT HUDMSG =

# TRIGGER THE HEADSHOT IF A TEAM KILL HAPPENS
# TRIGGER THE HEADSHOT IF A TEAM KILL HAPPENS.
#
HEADSHOT ON TEAM KILL = 0

# SUICIDE
# SUICIDE.
#
# THE HUD MESSAGE STRUCTURE IS "%s {MESSAGE}" OR "{MESSAGE} %s", WHERE '%s' IS THE VICTIM.
#
SUICIDE EVENT = 1
SUICIDE SOUNDS = AQS/yourefunny.wav
SUICIDE HUDMSG = %s KNOWS HOW THE KILL COMMAND WORKS!

# GRENADE KILL
# GRENADE KILL.
#
# THE HUD MESSAGE STRUCTURE IS "%s {MESSAGE} %s {MESSAGE}", WHERE THE FIRST '%s' IS THE KILLER NAME AND THE NEXT '%s' IS THE VICTIM NAME.
#
NADE EVENT = 1
NADE SOUNDS = AQS/laughs.wav , AQS/laughs2.wav , AQS/laughs3.wav , AQS/laughs4.wav , AQS/shutdown.wav
NADE HUDMSG = %s MADE A PRECISION THROW TO %s

# GRENADE WEAPON NAMES ( PARTIAL NAME OR FULL NAME )
# GRENADE WEAPON NAMES ( PARTIAL NAME OR FULL NAME ).
#
NADE NADES = GREN , NADE , NATE , FRAG , MILLS BOMB , SATCHEL

# TRIGGER THE GRENADE IF A TEAM KILL HAPPENS
# TRIGGER THE GRENADE IF A TEAM KILL HAPPENS.
#
NADE ON TEAM KILL = 0

# TEAM KILL
# TEAM KILL.
#
# THE HUD MESSAGE STRUCTURE IS "%s {MESSAGE}" OR "{MESSAGE} %s", WHERE '%s' IS THE KILLER NAME.
# THIS EVENT IS ONLY FOR CSTRIKE, CZERO AND DOD MODS.
Expand All @@ -322,23 +350,27 @@ TEAMKILL EVENT = 1
TEAMKILL SOUNDS = AQS/teamkiller.wav
TEAMKILL HUDMSG = %s IS SICK!

# KNIFE KILL
# KNIFE KILL.
#
# THE HUD MESSAGE STRUCTURE IS "%s {MESSAGE} %s {MESSAGE}", WHERE THE FIRST '%s' IS THE KILLER NAME AND THE NEXT '%s' IS THE VICTIM NAME.
#
KNIFE EVENT = 1
KNIFE SOUNDS = AQS/humiliating.wav , AQS/humiliatingdefeat.wav , AQS/humiliation.wav
KNIFE HUDMSG = %s SLICED AND DICED %s!

# KNIFE WEAPON NAMES ( PARTIAL NAME OR FULL NAME )
# KNIFE WEAPON NAMES ( PARTIAL NAME OR FULL NAME ).
#
KNIFE KNIVES = KNIF , SPAD , CROW

# TRIGGER THE KNIFE IF A TEAM KILL HAPPENS
# TRIGGER THE KNIFE IF A TEAM KILL HAPPENS.
#
KNIFE ON TEAM KILL = 0

# FIRST BLOOD
# TO TRIGGER THE KNIFE KILL EVENT, THE DISTANCE IN UNITS BETWEEN THE TWO PLAYERS MUST BE AT MOST THIS MANY UNITS.
#
KNIFE MAX DISTANCE = 256

# FIRST BLOOD.
#
# THE HUD MESSAGE STRUCTURE IS "%s {MESSAGE}" OR "{MESSAGE} %s", WHERE '%s' IS THE KILLER NAME.
#
Expand Down Expand Up @@ -369,7 +401,7 @@ FIRSTBLOOD ON WORLD DMG SUICIDE = 0
#
FIRSTBLOOD ON TEAM KILL = 0

# ROUND START
# ROUND START.
#
# THE HUD MESSAGE STRUCTURE IS "{MESSAGE}", THE MESSAGE YOU WANT, DON'T USE '%s' HERE!
# THIS EVENT IS ONLY FOR CSTRIKE, CZERO AND DOD MODS.
Expand All @@ -380,11 +412,11 @@ ROUNDSTART HUDMSG = PREPARE TO FIGHT!

# /// WILL PLAY THE EVENT "X" SECONDS AFTER THE ROUND START FREEZE TIME BEGINS ( DEFAULT = 0.100000 WHICH MEANS 0.1 SECONDS ).
#
# DAY OF DEFEAT GAME -> THE MINIMUM IS 1.300000 ( 1.3 ), IT WILL BE AUTO INCREASED IF SMALLER THAN THIS VALUE
# DAY OF DEFEAT GAME -> THE MINIMUM IS 1.300000 ( 1.3 ), IT WILL BE AUTO INCREASED IF SMALLER THAN THIS VALUE.
#
ROUNDSTART DELAY SECONDS = 0.100000

# DOUBLE KILL
# DOUBLE KILL.
#
# THE HUD MESSAGE STRUCTURE IS "%s {MESSAGE}" OR "{MESSAGE} %s", WHERE '%s' IS THE KILLER NAME.
#
Expand All @@ -402,9 +434,9 @@ DKILL IF TEAM KILL = 0

# TWO VICTIMS ARE NEEDED WITHIN THIS MANY SECOND(S) TO TRIGGER THE DOUBLE KILL EVENT.
#
DKILL TIME FRAME = 0.100000 # ( DEF 0.100000 )
DKILL TIME FRAME = 0.100000 # ( DEF 0.100000 ).

# HATTRICK
# HATTRICK.
#
# THE HUD MESSAGE STRUCTURE IS "%s {MESSAGE}" OR "{MESSAGE} %s", WHERE '%s' IS THE LEADER NAME, THE PLAYER WITH MOST KILLS FOR THIS ROUND.
# THE 'MIN FRAGS FOR HATTRICK' MEANS HOW MANY FRAGS YOU SHOULD DO THIS ROUND TO APPEAR AT THE ROUND END AS "<%> WAS UNREAL THIS ROUND!".
Expand Down Expand Up @@ -435,21 +467,21 @@ HATTRICK FRAG IGNORED IF TEAM KILL = 1
# //////////////////////////////

#
# HATTRICK RELATED
# HATTRICK RELATED.
#
# IF YOU KILL YOURSELF BY USING THE 'KILL' COMMAND, THE GAME TAKES 1 FRAG AWAY FROM YOU, BY DEFAULT.
# IF YOU KILL YOURSELF BY JUMPING, ..., THE GAME ONLY ADDS 1 DEATH, WITHOUT ALTERING YOUR FRAGS COUNT.
# SHOULD 'HATTRICK' EVENT ALSO DECREASE 1 FRAG FROM THE PLAYER'S 'FRAGS REQUIRED FOR HATTRICK' IF THEY SUICIDE BY THE 'KILL' COMMAND?
#
# 1 = YES [ DEFAULT ]
# 0 = NO
# 1 = YES [ DEFAULT ].
# 0 = NO.
#

DECREASE FRAG IN CASE OF 'KILL' COMMAND SUICIDE = 1

# //////////////////////////////

# FLAWLESS VICTORY
# FLAWLESS VICTORY.
#
# THE HUD MESSAGE STRUCTURE IS "{MESSAGE} %s {MESSAGE}", WHERE '%s' IS THE TEAM NAME.
# YOU CAN SET THE TEAM NAMES TO BE SHOWN. YOU CAN USE FOR EXAMPLE 'TERRO' INSTEAD OF THE DEFAULT VALUE 'TERRORIST'.
Expand All @@ -464,9 +496,9 @@ FLAWLESS VICTORY HUDMSG = FLAWLESS %s VICTORY!
TE TEAM NAME = TERRORIST
CT TEAM NAME = COUNTER-TERRORIST

FLAWLESS MIN PLAYERS = 2 # AT LEAST THIS MANY PLAYERS ARE REQUIRED TO BE ON THAT TEAM IN ORDER TO TRIGGER THE FLAWLESS VICTORY EVENT ( DEFAULT 2 )
FLAWLESS MIN PLAYERS = 2 # AT LEAST THIS MANY PLAYERS ARE REQUIRED TO BE ON THAT TEAM IN ORDER TO TRIGGER THE FLAWLESS VICTORY EVENT ( DEFAULT 2 ).

# REVENGE
# REVENGE.
#
# THE HUD MESSAGE STRUCTURE IS "%s {MESSAGE}" OR "{MESSAGE} %s", WHERE '%s' IS THE KILLER OR THE VICTIM NAME.
# IF 'REVENGE ONLY FOR KILLER' IS SET TO 1, THE VICTIM WILL NOT HEAR THE SOUND.
Expand All @@ -477,11 +509,11 @@ REVENGE SOUNDS = AQS/payback.wav , AQS/vengeance.wav , AQS/retributio
REVENGE KILLER MESSAGE = YOU HAVE PAID %s BACK!
REVENGE VICTIM MESSAGE = %s HAS JUST PAID YOU BACK!

# TRIGGER THE REVENGE IF A TEAM KILL HAPPENS
# TRIGGER THE REVENGE IF A TEAM KILL HAPPENS.
#
REVENGE ON TEAM KILL = 0

# THE LAST MAN STANDING
# THE LAST MAN STANDING.
#
# THE HUD MESSAGE STRUCTURE [ TEAM ] IS "%s {MESSAGE} %a", WHERE '%s' IS THE LAST MAN STANDING NAME,
# AND '%a' IS A RANDOM WORD FROM THE LIST BELOW.
Expand All @@ -495,7 +527,8 @@ TLMSTANDING SOUNDS = AQS/youarethelastmanstanding.wav , AQS/iamtheoneando
TLMSTANDING WORDS = GUY , MAN STANDING , ONE , ONE ALIVE
TLMSTANDING TEAM HUDMSG = %s IS THE LAST %a!
TLMSTANDING SELF HUDMSG = YOU ARE THE LAST %a!
TLMSTANDING DELAY = 1.000000 # // THE LAST MAN STANDING TRIGGER DELAY ( DEF 1.000000 )
TLMSTANDING DELAY = 1.000000 # // THE LAST MAN STANDING TRIGGER DELAY ( DEF 1.000000 ).
TLMSTANDING GUY ONLY = 1 # // IF 0, ALL THE DEAD PLAYERS INTO THE LAST MAN STANDING'S TEAM WILL HEAR THE SOUND ( DEF 1 ).

##############################################################################################################################################
############################ DELAY(S) ########################################################################################################
Expand Down Expand Up @@ -534,16 +567,16 @@ QS_DISPLAY_PLAYER_EVENT_DELAY = 0.412345
#

HUD RGB EVENT = _ _ _ # FIRST BLOOD, GRENADE, KNIFE, TEAM KILL, ...
HUD RGB ROUND = _ _ _ # ROUND START
HUD RGB ROUND = _ _ _ # ROUND START.
HUD RGB STREAK = _ _ _ # RAMPAGE, EXCELLENT, OWNAGE, IMPRESSIVE, ...
HUD RGB REVENGE = _ _ _ # REVENGE
HUD RGB HATTRICK = _ _ _ # HATTRICK
HUD RGB REVENGE = _ _ _ # REVENGE.
HUD RGB HATTRICK = _ _ _ # HATTRICK.

HUD RGB STANDING TE = _ _ _ # CS/ CZ THE LAST MAN STANDING TE ( TERRORIST TEAM [ CS/ CZ ] )
HUD RGB STANDING CT = _ _ _ # CS/ CZ THE LAST MAN STANDING CT ( COUNTER-TERRORIST TEAM [ CS/ CZ ] )
HUD RGB STANDING TE = _ _ _ # CS/ CZ THE LAST MAN STANDING TE ( TERRORIST TEAM [ CS/ CZ ] ).
HUD RGB STANDING CT = _ _ _ # CS/ CZ THE LAST MAN STANDING CT ( COUNTER-TERRORIST TEAM [ CS/ CZ ] ).

HUD RGB FLAWLESS TE = _ _ _ # FLAWLESS VICTORY TE ( TERRORIST TEAM [ CS/ CZ ] )
HUD RGB FLAWLESS CT = _ _ _ # FLAWLESS VICTORY CT ( COUNTER-TERRORIST TEAM [ CS/ CZ ] )
HUD RGB FLAWLESS TE = _ _ _ # FLAWLESS VICTORY TE ( TERRORIST TEAM [ CS/ CZ ] ).
HUD RGB FLAWLESS CT = _ _ _ # FLAWLESS VICTORY CT ( COUNTER-TERRORIST TEAM [ CS/ CZ ] ).

##############################################################################################################################################
############################ TEXT CHAT PHRASES ###############################################################################################
Expand Down Expand Up @@ -661,14 +694,16 @@ QS_PHR_DISABLED = DISABLED
############################ CS/ CZ ROUND(S) STUFF ###########################################################################################
##############################################################################################################################################

QS HATTRICK EXTEND ROUND END TIME SECONDS = 1.000000 # // EXTEND THIS MANY SECONDS THE ROUND END PERIOD TO ENSURE HATTRICK PLAYS ENTIRELY ( DEF 1.000000 )
QS FLAWLESS EXTEND ROUND END TIME SECONDS = 1.000000 # // EXTEND THIS MANY SECONDS THE ROUND END PERIOD TO ENSURE FLAWLESS PLAYS ENTIRELY ( DEF 1.000000 )
QS HATTRICK EXTEND ROUND END TIME SECONDS = 1.000000 # // EXTEND THIS MANY SECONDS THE ROUND END PERIOD TO ENSURE HATTRICK PLAYS ENTIRELY ( DEF 1.000000 ).
QS FLAWLESS EXTEND ROUND END TIME SECONDS = 1.000000 # // EXTEND THIS MANY SECONDS THE ROUND END PERIOD TO ENSURE FLAWLESS PLAYS ENTIRELY ( DEF 1.000000 ).

QS HATTRICK SECONDS DELAY AFTER ROUND END = 2.800000 # // HATTRICK ROUND END DELAY ( DEF 2.800000 ).
QS FLAWLESS SECONDS DELAY AFTER ROUND END = 1.200000 # // FLAWLESS ROUND END DELAY ( DEF 1.200000 ).

QS HATTRICK SECONDS DELAY AFTER ROUND END = 2.800000 # // HATTRICK ROUND END DELAY ( DEF 2.800000 )
QS FLAWLESS SECONDS DELAY AFTER ROUND END = 1.200000 # // FLAWLESS ROUND END DELAY ( DEF 1.200000 )
QS ROUND END EXTENSION STEP = 0.050025 # // IF A NEW ROUND STARTS BUT YOU STILL HEAR SOUNDS/ SEE MESSAGES, THIS VALUE MUST BE INCREASED ( DEF 0.050025 ).

##############################################################################################################################################
############################ DOD ROUND(S) STUFF ##############################################################################################
##############################################################################################################################################

QS HATTRICK SECONDS DELAY AFTER ROUND END DOD = 0.000001 # // HATTRICK ROUND END DELAY [ DAY OF DEFEAT ] ( DEF 0.000001 )
QS HATTRICK SECONDS DELAY AFTER ROUND END DOD = 0.000001 # // HATTRICK ROUND END DELAY [ DAY OF DEFEAT ] ( DEF 0.000001 ).
Loading

0 comments on commit 28b7e92

Please sign in to comment.