|
本帖最后由 css 于 2013-1-20 00:13 编辑
qq群 43825416 下载qq群 43825416 下载
qq群 43825416 下载
qq群 43825416 下载
qq群 43825416 下载
qq群 43825416 下载
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
// 请修改成相应的权限
#define ADMIN_RESPAWN_LEVEL ADMIN_LEVEL_B // "n"
#define ADMIN_WEAPON_LEVEL ADMIN_LEVEL_D // "p"
#define ADMIN_HP_LEVEL ADMIN_LEVEL_E // "q"
#define ADMIN_MM_LEVEL ADMIN_LEVEL_H // "t"
// 请修改成你所需要的模型
new g_Model[8][]={
"linghuT", // weapon(T)
"linghuCT", // weapon(CT)
"cngirl", // hp(T)
"jiewu1", // hp(CT)
"jiafeiji", // MM(T)
"jingwu1", // MM(CT)
"yulu", // OP(T)
"huomeigui" // OP(CT)
}
public plugin_init(){
register_plugin("Admin Model x","2.3x","Rulzy")
RegisterHam( Ham_Spawn, "player", "fw_PlayerSpawn", 1 )
}
public plugin_precache(){
new modelname[64]
for(new i=0;i<8;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_RESPAWN_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 0
}
else if(userTeam == CS_TEAM_CT) {
ModelIndex = 1
}
}else if (flags & ADMIN_WEAPON_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 2
}
else if(userTeam == CS_TEAM_CT){
ModelIndex = 3
}
}else if (flags & ADMIN_HP_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 4
}
else if(userTeam == CS_TEAM_CT){
ModelIndex = 5
}
}else if (flags & ADMIN_MM_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 6
}
else if(userTeam == CS_TEAM_CT){
ModelIndex = 7
}
}
if(ModelIndex==-1)
{
cs_reset_user_model(id);
}else{
cs_set_user_model(id, g_Model[ModelIndex]);
}
return PLUGIN_CONTINUE
}
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|