AutoResetScore: Resets to 0 if KILLS minus DEATH >= X
Posted: Mon Nov 22, 2021 9:48 pm
What it does: Automaticly (!) resets the KILLS and DEATHS to ZERO in the next Round if KILLS minus DEATH reaches 30+ and displays a little message.// This Plugin resets the Score of Players when KILLS-DEATH >= 30. Part of the Source is from AutoKick made by V3X.
#include <amxmodx>
#include <cstrike>
#include <fun>
public plugin_init() {
// ..
register_plugin("AutoResetScore","1.0","[TLR]Cromwell")
register_event("ResetHUD","newRound","be")
register_cvar("frags_limit","30")
}
public newRound(id) {
if((get_user_frags(id))-(cs_get_user_deaths(id)) >= get_cvar_num("frags_limit")) {
set_user_frags(id,0)
cs_set_user_deaths(id,0)
client_print(id, print_chat, "Your SCORE (KILLS-DEATHS) is more than 30. Your KILLS/DEATHS are resetted to ZERO")
}
return PLUGIN_HANDLED
}
You can change the FraglimitValue here:
What to do:register_cvar("frags_limit","30")
1. OK, the Hud message is lightly overseen, so maybe a centered Message will do better, but if another Message intervenes , it vanishes too fast...
2. Maybe a cool SoundClip ( e.g Hot Chocolates "Every 1's a winner babe, but u don't" )
3. Trigger funny events at specified Scores... (That would lead the Plugin in a different direction, but why not make another out of it)
4. Make your suggestions....
plugin
source