hi..
i need this code by connor but with T:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#define CS_CT_VIP 9
#define OFFSET_TEAM 114
#define OFFSET_INTERNALMODEL 126
#define SCOREATTRIB_VIP (1<<2)
public plugin_init() {
register_plugin("Admin VIP", "1.0", "ConnorMcLeod")
if ( engfunc(EngFunc_FindEntityByString, 0, "classname", "info_vip_start") <= 0 )
register_message(get_user_msgid("ScoreAttrib"), "Hook_ScoreAttrib")
}
public Hook_ScoreAttrib(osef2talife, osef3talife, osef4talife)
{
new id = get_msg_arg_int(1)
if(get_pdata_int(id, OFFSET_TEAM) != 2)
return PLUGIN_CONTINUE
new adminflags = get_user_flags(id)
if(!adminflags || adminflags & ADMIN_USER)
return PLUGIN_CONTINUE
if(get_msg_arg_int(2))
return PLUGIN_CONTINUE
set_pdata_int(id, OFFSET_INTERNALMODEL, CS_CT_VIP)
dllfunc(DLLFunc_ClientUserInfoChanged, id)
set_msg_arg_int(2, 0, SCOREATTRIB_VIP)
return PLUGIN_CONTINUE
}
it posible? or need another way?
or..... see this..
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define VIP "models/player/vip/vip.mdl"
#define FLAG "ADMIN_KICK"
public plugin_init() {
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model(VIP)
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
if (get_user_flags(id) & FLAG)
{
cs_set_user_model(id, VIP)
}
else
{
cs_reset_user_model(id)
}
return PLUGIN_CONTINUE;
}
Quote:
|
/home/groups/amxmodx/tmp3/textp6J3WJ.sma(20) : error 033: array must be indexed (variable "-unknown-")
|