模型插件 怎么设置都可以使用的权限 我设置Z就不成功了
#include <amxmodx>#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
// 请修改成相应的权限 这个位置的设置成玩家默认的Z就不成功了
#define ADMIN_MM_LEVEL ADMIN_LEVEL_Z // "t"
// 请修改成你所需要的模型
new g_Model[][]={
"CVTMM_T", // MM(T)
"CVTMM_CT" // MM(CT)
}
public plugin_init(){
register_plugin("Admin Model","2.3","Rulzy")
RegisterHam( Ham_Spawn, "player", "fw_PlayerSpawn", 1 )
}
public plugin_precache(){
new modelname
for(new i=0;i<sizeof g_Model;i++){
formatex(modelname, 63, "models/player/%s/%s.mdl", g_Model, g_Model)
precache_model(modelname)
}
}
public fw_PlayerSpawn(id)
{
if(!is_user_connected(id) || !is_user_alive(id)) return PLUGIN_CONTINUE;
new CsTeams:userTeam = cs_get_user_team(id);
new ModelIndex = -1;
new flags = get_user_flags(id);
if (flags & ADMIN_MM_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 0
}
else if(userTeam == CS_TEAM_CT){
ModelIndex = 1
}
}
if(ModelIndex==-1)
{
cs_reset_user_model(id);
}else{
cs_set_user_model(id, g_Model);
}
return PLUGIN_CONTINUE
}
木有人了啊 删掉权限相关的语句就可以了 删掉权限,或者你设置成admin_all就行了
页:
[1]