Hello,
since quite a while I've been running a CS 1.6 dedicated Server with AMX 0.9.9b, metamod 1.17.1 on a linux machine. I have several plugins for amx installed and everything is really running fine.
Just a few weeks ago i stumbled over an awesome plugin, its the adminmodel plugin which allows admin on a server to have another model/skin.
I had a a covertops plugin once installed and it worked pretty well with the bots, the plugin allows you to put on the skin of a killed enemy, the podbots work pretty good with it, since they seem to look at the model or the skin, your teammates dont notice you as a friend and shoot at you and the enemys dont notice you as an enemy... at a new round the model is switched back to normal.
having all this in mind we come to the problem of the adminmodel plugin:
as an admin, or by steamid you join the server, the plugin notices you the first time and assignes an admin model to your id. i joined terrorists the first time and got the admin-terrorist model. after a round i wanted to test the ct admin model and changed team, but as soon as buytime was over my bot-teammates started attacking me.
even after reconnecting to the server i only might join the terrorist team because my ct team mates still attack me. it seems like the model is correct but the bots dont notice me as a ct-teammate, in this case.
The original plugincode is this, where i just changed set_user_model to CS_SetModel.
Code:
#include <amxmod>
#include <amxmisc>
#include <VexdUM>
public plugin_init() {
register_plugin("AMX Admin Model", "1.1.1", "whitemike")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/admin_ct/admin_ct.mdl")
precache_model("models/player/admin_te/admin_te.mdl")
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_KICK) {
new userTeam = get_user_team(id)
if (userTeam == 1) {
CS_SetModel(id, "admin_te")
}
else if(userTeam == 2) {
CS_SetModel(id, "admin_ct")
}
else {
CS_SetModel(id)
}
}
return PLUGIN_CONTINUE
}
It crashes my server as soon as i connect.
I tried the next one which worked as above written, it didnt crash the server but the bots teamattacked me.
Code:
#include <amxmod>
#include <Vexd_Utilities>
public plugin_init() {
register_plugin("AMX Admin Model", "1.1.1", "whitemike")
register_event("ResetHUD", "resetHud", "b")
}
public plugin_precache() {
precache_model("models/player/admin_ct/admin_ct.mdl")
precache_model("models/player/admin_te/admin_te.mdl")
}
public resetHud(id) {
set_task(0.2, "resetModel", id)
}
public resetModel(id) {
new authid[32]
get_user_authid(id, authid, 31)
new userTeam = get_user_team(id)
if(equal(authid, "STEAM_")) {
if (userTeam == 1)
CS_SetModel(id, "admin_te")
else if(userTeam == 2)
CS_SetModel(id, "admin_ct")
}
else if(equal(authid, "STEAM_")) {
if (userTeam == 1)
CS_SetModel(id, "admin_te")
else if(userTeam == 2)
CS_SetModel(id, "admin_ct")
}
else if(equal(authid, "STEAM_")) {
if (userTeam == 1)
CS_SetModel(id, "admin_te")
else if(userTeam == 2)
CS_SetModel(id, "admin_ct")
}
}
it also didnt work with this aswell:
Code:
#include <amxmod>
#include <Vexd_Utilities>
stock is_user_admin(id){
return ( get_user_flags(id)>0 && !(get_user_flags(id)&ADMIN_USER) )
}
public plugin_init() {
register_plugin("AMX Admin Model", "1.1.1", "whitemike")
register_event("ResetHUD", "resetHud", "b")
}
public plugin_precache() {
precache_model("models/player/admin/admin_ct.mdl")
precache_model("models/player/admin/admin_te.mdl")
}
public resetHud(id) {
set_task(0.2, "resetModel", id)
}
public resetModel(id) {
if (is_user_admin(id)) {
new userTeam = get_user_team(id)
if (userTeam == 1) {
CS_SetModel(id, "admin_ct")
}
else if(userTeam == 2) {
CS_SetModel(id, "admin_te")
}
else {
CS_ClearModel(id)
}
}
return PLUGIN_CONTINUE
}
I read through 16 pages on the amxx forums where the plugin seems to have its origin, and one post said that it cant work with podbots... but i dont know how reliable that is, cause the covertops plugin worked great....
thx for the help