For some reason, it didn't work.
I'm trying to:
- If player joins Axis, bot or not, it sets their model to what I have set
- otherwise it leaves the default model
This is my code so far, compiles and runs fine, but the model isn't set for some reason.
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <dodx>
#define PLUGIN "DoD Models"
#define VERSION "1.0"
#define AUTHOR "awpticaL`"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("ResetHUD", "setModel", "b")
}
public plugin_precache() {
precache_model("models/hat_axis.mdl")
precache_model("models/helmet_axis.mdl")
precache_model("models/player/axis-inf/axis-inf.mdl")
precache_model("models/player/axis-inf/axis-infT.mdl")
}
public setModel(id) {
new userTeam = get_user_team(id)
if (userTeam == 1) {
dod_set_model(id,"axis-inf")
}
else {
dod_clear_model(id)
}
}
__________________
[img]http://img247.**************/img247/1166/userbar414943lj2.gif[/img]
[img]http://img116.**************/img116/527/ownage39ch.jpg[/img]