ok im working on a plugin, and i have it to set you to a model, and every new round the model is still that model from the plugin, and I want it to change back to the normal model at the start of the round.
So what do I need to add to make it work? What I want to do is to create a new round event so that I can check the users model at the start of the round, to see if it is that model still, and if it is, then to reset the model...
How would I do this?
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define PLUGIN "GorillaMode"
#define VERSION "1.0"
#define AUTHOR "LittleDude"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /gorillame", "gorillathem")
register_clcmd("say_team /gorillame", "gorillathem")
register_cvar("amx_gorilla", "1")
}
public plugin_precache(){
precache_model("models/player/gorilla/gorilla.mdl")
return PLUGIN_CONTINUE
}
public gorillathem(id){
if(get_cvar_num("amx_gorilla") == 0)
return PLUGIN_HANDLED
if(!is_user_alive(id)){
client_print(id, print_chat, "[Gorilla] You are dead and cannot go Gorilla Mode!")
return PLUGIN_HANDLED
}
new health = get_user_health(id)
if(is_user_alive(id) && health >= 50){
client_print(id, print_chat, "[Gorilla] You have too much health to turn Gorilla mode!")
return PLUGIN_HANDLED
}
else if(health < 50){
set_user_health(id, 250)
set_user_armor(id, 250)
give_item(id, "weapon_m249")
give_item(id, "ammo_556nato")
give_item(id, "ammo_556nato")
cs_set_user_model(id, "gorilla")
}
client_print(id, print_chat, "[Gorilla] You have gone Gorilla Mode!")
return PLUGIN_HANDLED
}
That is my code...and also the second thing is, when i do the give_item(id, "ammo_556nato") it never gives the ammo for the m249...so how do i make this work?[/small]
__________________