麻烦R版进来瞧瞧
本帖最后由 czdczdczd 于 2010-8-28 14:02 编辑这个插件来自R版的“ 可大大减少或消除由于服装引起群踢的cstrike模块”
http://www.dt-club.net/forum/viewthread.php?tid=44723&extra=&highlight=%E6%9C%8D%E8%A3%85&page=1
本人菜鸟对于权限怎么改我不太懂,看看帮我把权限改一下,发在下面,让有mnop权限的都可以有服装,谢谢。插件好象出错不能编译
; m - custom level A (for additional plugins) OP(男装) (自定义管理级别,为附加的权限等级)
; n - custom level B----------------------------VIP(男装)
; o - custom level C----------------------------MM(女装)
; p - custom level D ----------------------------战队队员(男装)我要把这个加上去,不会弄
(附R版的admin_model.sma):
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
// 请修改成相应的权限
#define ADMIN_OP_LEVEL ADMIN_LEVEL_F // "q"
#define ADMIN_VIP_LEVEL ADMIN_LEVEL_G // "r"
#define ADMIN_MM_LEVEL ADMIN_LEVEL_H // "t"
// 请修改成你所需要的模型
new g_Model[]={
"CVTOP_T", // OP(T)
"CVTOP_CT", // OP(CT)
"CVTVIP_T", // VIP(T)
"CVTVIP_CT", // VIP(CT)
"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<6;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_OP_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 0
}
else if(userTeam == CS_TEAM_CT) {
ModelIndex = 1
}
}else if (flags & ADMIN_VIP_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 2
}
else if(userTeam == CS_TEAM_CT){
ModelIndex = 3
}
}else if (flags & ADMIN_MM_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 4
}
else if(userTeam == CS_TEAM_CT){
ModelIndex = 5
}
}
if(ModelIndex==-1)
{
cs_reset_user_model(id);
}else{
cs_set_user_model(id, g_Model);
}
return PLUGIN_CONTINUE
} #include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
// 请修改成相应的权限
#define ADMIN_OP_LEVEL ADMIN_LEVEL_F // "q"
#define ADMIN_VIP_LEVEL ADMIN_LEVEL_G // "r"
#define ADMIN_MM_LEVEL ADMIN_LEVEL_H // "t"
#define ADMIN_ZZ_LEVEL ADMIN_LEVEL_D // "p"
// 请修改成你所需要的模型
new g_Model[]={
"CVTOP_T", // OP(T)
"CVTOP_CT", // OP(CT)
"CVTVIP_T", // VIP(T)
"CVTVIP_CT", // VIP(CT)
"CVTMM_T", // MM(T)
"CVTMM_CT" // MM(CT)
"CVTZZ_T", // ZZ(T)
"CVTZZ_CT" // ZZ(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<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_OP_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 0
}
else if(userTeam == CS_TEAM_CT) {
ModelIndex = 1
}
}else if (flags & ADMIN_VIP_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 2
}
else if(userTeam == CS_TEAM_CT){
ModelIndex = 3
}
}else if (flags & ADMIN_MM_LEVEL){
if (userTeam == CS_TEAM_T){
ModelIndex = 4
}
else if(userTeam == CS_TEAM_CT){
ModelIndex = 5
}
}else if (flags & ADMIN_ZZ_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);
}
return PLUGIN_CONTINUE
} 太感谢了,我去试下 麻烦版主再看下哪里错了,这里有问题
20 "CVTZZ_T", // ZZ(T) 留个脚印,收藏~~~ 还是不行,rsdtt 版主能不能转成AMXX,让我下载,再次感谢 for(new i=0;i<=8;i++){ for(new i=0;i
心静如水 发表于 2010-8-30 08:42 http://www.dt-club.net/forum/images/common/back.gif
这里不能用=8,他的意思应该是编码问题 我有个办法,可能好一点!
我把主要的说出来就行了哈!new g_Model[]==>new g_Model[][]还有把public plugin_precache(){
new modelname
for(new i=0;i<8;i++){
formatex(modelname, 63, "models/player/%s/%s.mdl", g_Model, g_Model)
precache_model(modelname)
}
}
改成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)
}
}
这样你以后要是想加模型就只需要在new g_Model[]={
"CVTOP_T", // OP(T)
"CVTOP_CT", // OP(CT)
"CVTVIP_T", // VIP(T)
"CVTVIP_CT", // VIP(CT)
"CVTMM_T", // MM(T)
"CVTMM_CT" // MM(CT)
}加,然后再服装代码里按照R版的加就行了,,:)