Hello,
I want to create a plugin that would change the model to any other terrorist model, at a certain variable. I tried to create, but nothing came of it. What did I do wrong in the plugin?
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define PLUGIN "test"
#define VERSION "1.0 beta"
#define AUTHOR "Mihail"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("dr_mode","1")
return PLUGIN_CONTINUE
}
public plugin_precache ()
{
precache_model("models/player/gign/gign.mdl")
return PLUGIN_CONTINUE
}
///террорист становится зомби
public ter_infect(id) {
if (get_user_team(id) == 1 && get_cvar_num("dr_mode") == 2)
{
cs_set_user_model(id, "gign")
set_user_health(id, 2000)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
P.S. Translate by google.