请问该名字重进服并被惩罚够10局后加啥命令可以在_pname.ini中删除了它,附段原码...
public plugin_cfg(){get_configsdir(g_motdFile, 63)
format(g_motdFile, 63, "%s/_pname.ini", g_motdFile)
new pname, len, line = 0
while(read_file( g_motdFile, line++, pname, 63, len)){
kickName = pname // 记录玩家ID,重新登陆将被惩罚
for(new i = 1; i< MAX; i++)
kickName = kickName
}
return PLUGIN_CONTINUE
}
public plugin_end(){
delete_file(g_motdFile)
for(new i = 0; i< MAX; i++)
write_file( g_motdFile, kickName)
return PLUGIN_CONTINUE
}
public client_putinserver(id){
kill = 0
death = 0
// 被记录玩家ID,重新登陆将被惩罚
new name,usrip
get_user_name( id, name, 31)
get_user_ip( id, usrip, 31, 1)
for(new i = 0; i< MAX; i++){
if( containi( name, kickName) != -1 )
g_menuSettings = 15
}
return PLUGIN_CONTINUE
}
// ************************
public newRound(){
g_voteTimes = 0 // 每局投票次数初始化
set_task( 5.0 , "roundDelay")
}
public roundDelay(){
new players,num
get_players( players, num)
for (new i = 0; i < num; i++){
new id = players
if( g_playerFly )
stopFly(id) // 停止飞天
if(isSlaped){
remove_task(888)
isSlaped = false // 停止煽耳光
set_user_gravity( id, 1.0) // 重力
}
if( g_playerFlag && is_user_alive(id) ){
g_PunishedRound++
// *********** 下局开始惩罚过程 ***********
if(g_PunishedRound <= g_playerFlag){
new pname
get_user_name( id, pname, 31)
new Msg
format( Msg, 127, "^x01* ^x03%s^x01作弊,第^x04%d^x01局(共^x04%d^x01局)惩罚中...", pname, g_PunishedRound, g_playerFlag)
client_color(0, id, Msg)
if( get_cvar_num( "amx_pcheater") == 1){
cs_set_user_money( id, 0, 1)
set_user_health( id, 0)
}
}
// *********** 惩罚局数结束 ***********
if(g_PunishedRound > g_playerFlag){
g_playerFlag = 0 // 取消惩罚回合数
set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
g_PunishedRound = 0
}
}
}
return PLUGIN_HANDLED
}
// ************************
public client_disconnect(id){
if( isVoted || g_playerFlag || g_playerFly ){
new ipStr,pname
get_user_ip( id, ipStr, 15, 1 )
get_user_name( id, pname, 31)
new Msg
format( Msg, 127, "^x01* 注意:^x03%s^x01中途离开,将被封禁", pname)
client_color(0, id, Msg)
kickName = pname for(new i = 1; i< MAX; i++)
kickName = kickName
new Float:bantime = get_cvar_float("amx_pcheater_bantime")
server_cmd("addip %.2f %s;wait;writeip", bantime, ipStr) if( isVoted)
isVoted = false
if(isSlaped){
remove_task(888)
isSlaped = false // 停止煽耳光
set_user_gravity( id, 1.0) // 恢复重力
g_punishTimes = 0
}
if( g_playerFly){
g_playerFly = 0
g_punishTimes = 0
}
if( g_playerFlag){
g_playerFlag = 0 // 取消惩罚回合数
g_punishTimes = 0
}
}
return PLUGIN_CONTINUE
}
public client_connect(id)
{
if( !get_cvar_num("amx_pcheater") )
return PLUGIN_HANDLED
new pname
get_user_name( id, pname, 31)
get_user_info(id,"name",pname,31)
for (new i=0; i< MAX; i++)
if( equal(kickName,pname) ){
g_punishTimes=0;
g_PunishedRound=0;
g_playerFlag=10;//重进时若名字与作弊者相同则补惩罚10局
return PLUGIN_HANDLED;
}
}
(现在它出现这样的问题:被惩罚的名字被惩罚10局后还在_pname.ini文件中存在,造成它每次进服务器都被惩罚.....请老师们加段原码让它被惩罚够10局后该名字自动在_pname.ini中被删除...
[ 注:因为原作者不批准,所以我只能公布这段原码 ]
回复: 请问该名字重进服并被惩罚够10局后加啥命令可以在_pname.ini中删除了它,附段
晕啊..........你们都躲到哪里去了?请回话或帮解决一下吗.......回复: 请问该名字重进服并被惩罚够10局后加啥命令可以在_pname.ini中删除了它,附段
只有你对俺好,谢了,已成功修改到完美无缺....回复: 请问该名字重进服并被惩罚够10局后加啥命令可以在_pname.ini中删除了它,附段
无用的插件~~没用德 我想要这插件呢... 还是不错的!!
页:
[1]