Alright, this isn't a plugin test anymore, I guess I need help
Well here is what I have,
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
new bool:idtype[id]
public plugin_init()
{
register_plugin("Clan Models","0.1","Dizzy")
register_event("ResetHUD", "modelreset", "b")
new configsDir[64]
get_configsdir(configsDir, 63)
format(configsDir, 63, "%s/clan.cfg", configsDir)
return PLUGIN_HANDLED
}
public client_connect(id)
{
idtype[id] = false
}
public client_disconnect(id)
{
idtype[id] = false
}
public plugin_precache()
{
precache_model("models/clanmodels/clanter.mdl")
precache_model("models/clanmodels/clanct.mdl")
return PLUGIN_CONTINUE
}
public modelreset(id, level, cid)
{
new t_arg[16]
read_argv(4, t_arg, 15)
if (equali(t_arg, "steam") || equali(t_arg, "steamid") || equali(t_arg, "auth"))
{
idtype[id] = true
}
if (idtype[id] = true)
{
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T)
{
cs_set_user_model(id, "clanter")
}
if(userTeam == CS_TEAM_CT)
{
cs_set_user_model(id, "clanct")
}
}
return PLUGIN_CONTINUE
}
It is suppose to change the model of a person who is in the clan.cfg file...
So basically, you put a user's steamid into "clan.cfg" and when the round resets, their model changes to either clanter.mdl or clanct.mdl depending on what team they are on.
Thanks in advance guys!