Code:
#include <amxmodx> //Should only need amxmodx and tsx
#include <amxmisc>
#include <fun>
#include <tsx>
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("amx_superjump","0")
register_cvar("amx_kungfu","0")
register_event("ResetHUD","cmd_spawn","be")
}
public cmd_spawn(id) {
if(get_cvar_num("amx_superjump") == 1 && get_cvar_num("amx_kungfu") == 1) {
new ups = ts_createpwup(TSPWUP_SUPERJUMP)
ts_givepwup(id,ups)
ups = ts_createpwup(TSPWUP_KUNGFU)
ts_givepwup(id,ups)
client_print(id,print_chat,"[AMXX]Received free powerups")
} else if(get_cvar_num("amx_superjump") == 1) {
new ups = ts_createpwup(TSPWUP_SUPERJUMP)
ts_givepwup(id,ups)
client_print(id,print_chat,"[AMXX]Received free powerup")
} else {
new ups = ts_createpwup(TSPWUP_KUNGFU)
ts_givepwup(id,ups)
client_print(id,print_chat,"[AMXX]Received free powerup")
}
}
please help! I'm probably using the wrong event and if so thats the problem, I need to know when they spawn!
[edit] I should probably add that it crashes WHILE i join, the bar gets about 3/4 of the way and stops, then the ded server crashes. AMXX 1.01, TSX 1.01, TS 2.1, WIN XP HOME DED SERVER [/edit]