What an excellent plugin idea. Thank you very much for this.
I recommend modifying it to allow administrators to define the maximum number of points though:
Code:
#include <amxmodx>
#include <kve>
#include <fakemeta>
#define MAKE_STRING(%1) "%1"
#define STR_MAX_POINTS MAKE_STRING(MAX_POINTS)
public plugin_precache()
{
register_keyvalue("game_score", "points", "handle_game_score_points")
}
public plugin_init()
{
register_plugin("SCXPM Exploit Restrictor", "1.0", "ts2do")
register_cvar("xp_maxpoints", "1")
}
public handle_game_score_points(szValue[], entid, kvdid)
{
new maxPoints = get_cvar_num("xp_maxpoints")
if(str_to_num(szValue) > maxPoints)
{
set_kvd(kvdid, KV_Value, STR_MAX_POINTS)
}
}
^ although that fails, because of the definitions.
Also, this is Pawn. You don't need
; at the end of a statement.
Ignore the first 4 replies. Those guys have no idea what this plugin is about.
__________________