这段代码有问题,请谁帮看修正一下...
#include <amxmodx>#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("AdminModel", "2.0", "Aotshou")
register_event("ResetHUD", "resetModel","b");
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T){
if ( access(id, ADMIN_LEVEL_A) ){
cs_set_user_model(id, "mm_te")
}
else if(( get_user_frags(id)>=12 ) && get_user_team(id)==1 && !access(id, ADMIN_LEVEL_A)){
cs_set_user_model(id, "wa_te")
}
return PLUGIN_CONTINUE
}
if(userTeam == CS_TEAM_CT){
if( access(id, ADMIN_LEVEL_A) ){
cs_set_user_model(id, "op_ct8")
}
else if(( get_user_frags(id)>=12 ) && get_user_team(id)==2 && !access(id, ADMIN_LEVEL_A)){
cs_set_user_model(id, "hr_ct")
}
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
有人叫俺帮看....俺看不出来错的地方......谁能帮他改正错误?
回复: 这段代码有问题,请谁帮看修正一下...
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("AdminModel", "2.0", "Aotshou")
register_event("ResetHUD", "resetModel","be");
return PLUGIN_CONTINUE
}
public resetModel(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE;
new CsTeams:userTeam = cs_get_user_team(id);
if (userTeam == CS_TEAM_T)
{
if ( access(id, ADMIN_LEVEL_A) )
{
cs_set_user_model(id, "mm_te");
}else if(( get_user_frags(id)>=12 ) && !access(id, ADMIN_LEVEL_A)){
cs_set_user_model(id, "wa_te")
}
}else if(userTeam == CS_TEAM_CT)
{
if( access(id, ADMIN_LEVEL_A) )
{
cs_set_user_model(id, "op_ct8")
}else if(( get_user_frags(id)>=12 ) && !access(id, ADMIN_LEVEL_A)){
cs_set_user_model(id, "hr_ct")
}
}
return PLUGIN_CONTINUE
}
当然你还要缓存模型文件.
回复: 这段代码有问题,请谁帮看修正一下...
貌似不明白~~~~:sexy_girl回复: 这段代码有问题,请谁帮看修正一下...
谢谢版主.....................当为何用if(( get_user_frags(id)>=3 ) && !access(id, ADMIN_LEVEL_A))的时候
服务器挺不了会踢人并刷新呢?是用模型太多的缘故吗?
回复: 这段代码有问题,请谁帮看修正一下...
版主能否做出一个稳定插件(除OP外)其它T统一用模型1,其它CT统一用模型2,就如以前你做的"中文手雷"那样?谢谢..........
页:
[1]