| Nimgoble |
04-07-2006 03:10 |
TS RP Super Jump
Hello. I've created a little script to slay a user that picks up the superjump item. Ideally, the item wouldn't be able to be picked up at all, but I just started scripting today. It compiles fine, but does not work with the TS RP mod. I believe the AMXX version the server is using is 1.01.
Code:
#include <amxmodx>
#include <tsx>
#include <tsconst>
#include <tsfun>
#include <tsstats>
public plugin_init()
{
register_plugin("TS Super Jump Disable","1.0","Nimgoble");
register_cvar("amx_togglesuperjump","0");
register_event("PwUp","check_powerup","be");
}
public check_powerup(id)
{
//new items = ts_getuseritems(id);
if( get_cvar_num("ts_has_superjump") && !get_cvar_num("amx_togglesuperjump"))
{
user_kill(id);
client_print(id,print_chat,"Super Jump is not allowed.");
}
//client_print(id,print_chat,"No Super Jump");
return PLUGIN_CONTINUE;
}
This is a bastardized version of someone else's script in another super jump thread. I also added "ts_has_superjump" because all the other items had one of their own. Does this not work because of the AMXX version or my code? Thanks for your help.
|