I think you need to check whether player is alive. function new_round() is not registered anywhere, so it cannot be called. You need to hook player spawn and then change it from there. all in all, it should look something like this:
Spoiler
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
new model[33]
new models[4][] = {
"player/gign",
"player/gsg9",
"player/sas",
"player/spetsnaz"
}
public plugin_init() {
register_plugin("imerge","1","man_s_our")
register_concmd("imerge", "imerge",0)
RegisterHam(Ham_Spawn, "player", "Ham_PlayerSpawnPost", 1)
return PLUGIN_CONTINUE
}
public imerge(id) {
model[id] = random(sizeof(models)-1)
if(is_user_alive(id))
cs_set_user_model(id, models[model[id]])
return PLUGIN_CONTINUE
}
public Ham_PlayerSpawnPost(id) {
if(is_user_alive(id) && model[id] != -1)
cs_set_user_model(id, models[model[id]])
}
public client_connect(id) {
model[id] = -1
}
as in model array:
PHP Code:
new const models[] = {
"player/gign/gign.mdl",
"player/gsg9/gsg9.mdl",
"player/sas/sas.mdl",
"player/spetsnaz/spetsnaz.mdl",
};
//this is incorrect, you need to write only a folder directory for a model.
//that is a case only for a player models tho
this should be instead:
PHP Code:
new models[4][] = {
"player/gign",
"player/gsg9",
"player/sas",
"player/spetsnaz"
}
__________________