|
Author
|
Message
|
|
Veteran Member
Join Date: Apr 2015
Location: Georgia
|

08-06-2018
, 11:35
Re: [HELP] ADMIN + VIP Models
|
#1
|
Quote:
Originally Posted by Shadowless
now i got other problem
i have both access on server ( ADMIN_LEVEL_C and ADMIN_KICK) (flags "c" and "o")
and i`m with model of VIP, i want to be with model higher access ADMIN_KICK with model ADMIN
PHP Code:
#include <amxmodx>
#include <cstrike>
#define PLUGIN "ADMIN + VIP Model"
#define VERSION "1.0"
#define AUTHOR "Author"
#define VIP_MODEL ADMIN_LEVEL_C
#define ADMIN_MODEL ADMIN_KICK
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("ResetHUD", "resetModel", "b");
}
public plugin_precache()
{
precache_model("models/player/admin_te/admin_te.mdl");
precache_model("models/player/admin_ct/admin_ct.mdl");
precache_model("models/player/vip_te/vip_te.mdl");
precache_model("models/player/vip_ct/vip_ct.mdl");
}
public resetModel(id, level, cid)
{
new CsTeams:userTeam = cs_get_user_team(id);
if(get_user_flags(id) & ADMIN_MODEL && !is_user_bot(id))
{
switch( userTeam )
{
case CS_TEAM_T: cs_set_user_model(id, "admin_te");
case CS_TEAM_CT: cs_set_user_model(id, "admin_ct");
}
}
if(get_user_flags(id) & VIP_MODEL && !is_user_bot(id))
{
switch( userTeam )
{
case CS_TEAM_T: cs_set_user_model(id, "vip_te");
case CS_TEAM_CT: cs_set_user_model(id, "vip_ct");
}
}
return 0;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
|
Code:
if(get_user_flags(id) & ADMIN_MODEL && !is_user_bot(id))
{
switch( userTeam )
{
case CS_TEAM_T: cs_set_user_model(id, "admin_te");
case CS_TEAM_CT: cs_set_user_model(id, "admin_ct");
}
}
else if(get_user_flags(id) & VIP_MODEL && !is_user_bot(id))
{
switch( userTeam )
{
case CS_TEAM_T: cs_set_user_model(id, "vip_te");
case CS_TEAM_CT: cs_set_user_model(id, "vip_ct");
}
}
__________________
|
|
|
|