Hi.
I hope you are fine, geeks

my idea :
i want change model team whithout change the team
I will explain in short detail
I hope you understand me

first code :
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Test"
#define AUTHOR "LetiLetiLepestok"
#define VERSION "1.0"
new g_asModels[33][32]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_SetClientKeyValue, "SetClientKeyValue");
register_clcmd("set_model", "set_player_mdl")
}
public set_player_mdl(player)
{
new sModel[32]
read_argv(1, sModel, charsmax(sModel))
trim(sModel)
remove_quotes(sModel)
if(equal(sModel, ""))
g_asModels[player] = ""
g_asModels[player] = sModel
set_user_info(player, "model", g_asModels[player])
return PLUGIN_HANDLED
}
public SetClientKeyValue(player, const szInfoBuffer[], const szKey[], const szValue[])
{
if( equal(szKey, "model") && is_user_connected(player) && !equal(g_asModels[player], ""))
return FMRES_SUPERCEDE
return FMRES_IGNORED
}
this its work without change team
but im using this function to chage team without killing the player for other case :
PHP Code:
set_user_team(id,"zombie",false,false)
In the end :
I want to merge both cases into one job
so ! ( i need change team without killing and get the players this team random models )
PHP Code:
#define RANDOMSKINS 3
new g_asModels[33][32]
new const Set_Zombies_models[ RANDOMSKINS][] =
{
"red",
"clawler",
"blue"
}
__________________