Alright, here's what I want, I want this plugin to check clanmodels.cfg for STEAM ID's and if your STEAM ID is in the clanmodels.cfg, it will change your CS model to either clanter.mdl or clanct.mdl depending on what Team you are on...
Here's what I have
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init()
{
register_plugin("Clan Models","0.1","Dizzy")
register_event("ResetHUD", "modelreset", "b")
return PLUGIN_HANDLED
}
public plugin_precache()
{
precache_model("models/clanmodels/clanter.mdl")
precache_model("models/clanmodels/clanct.mdl")
return PLUGIN_CONTINUE
}
public modelreset(id, level, cid)
{
new filepath[64]
get_configsdir(filepath, 63)
format(filepath, 63, "%s/clanmodels.cfg", filepath)
if(file_exists(filepath))
{
new output[128]
new fHandle = fopen(filepath, "rt")
if(!fHandle)
return
for(new a = 0; !feof(fHandle); a++)
{
fgets(fHandle, output, 511)
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_HANDLED
}
Thanks in advance =)