 |
|
Senior Member
|

05-21-2009
, 08:46
Re: [HELP] cs_set_user_model [o.O]
|
#6
|
Try this code. I havent tested it ingame but it sure compiles properly.
Quote:
/* Plugin generated by Emilioneri */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Spy"
#define VERSION "1.0"
#define AUTHOR "Emilioneri"
new bool:amx_spy[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your code here...
register_concmd("amx_spy", "cmd_spy", ADMIN_SLAY, "< saxeli | #userid > 1/0")
}
public plugin_precache()
{
precache_model("models/player/sas/sas.mdl")
precache_model("models/player/guerilla/guerilla.mdl")
}
public cmd_spy(id, level, cid)
{
if (cmd_access(id, level, cid, 3))
amx_spy[id] = true
}
public resetModel(id, level, cid) {
if (amx_spy[id]) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "sas")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "guerilla")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
}
|
__________________
Last edited by Zombie Lurker; 05-21-2009 at 08:49.
|
|
|
|