AutoResetScore: Resets to 0 if KILLS minus DEATH >= X

Post Reply
greenie
Full Member
Full Member
Posts: 1815
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Nu

AutoResetScore: Resets to 0 if KILLS minus DEATH >= X

Post by greenie »

// 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
}
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.

You can change the FraglimitValue here:
register_cvar("frags_limit","30")
What to do:

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
Post Reply

Return to “Event Related”