|
public infoMessage() {
if(g_Current==0) g_subCurrent=0
if (g_Current >= g_MessagesNum)
{
g_subCurrent++;
if(g_subCurrent>=g_subMsgNum){
g_Current = 0
}
//在这里我们增加一个现实在线OP的模块
new opmsg[512],playerslist[32],playerscount,i,pos,opcount
get_players(playerslist,playerscount,"c")//Skip Bot
opcount=0;
if(g_subCurrent==1){
opmsg="【当前在线执行OP】^n_____________________^n"
pos=strlen(opmsg)
for(i=0;i<playerscount;i++){
if(access(playerslist[i],ADMIN_IMMUNITY)){
new username[33]
get_user_name(playerslist[i],username,32)
opcount++
pos+=format(opmsg[pos],511-pos,"%s^n",username)
}
}
if(opcount==0) opmsg="【当前没有在线OP】"
}
if(g_subCurrent==2){
opmsg="【当前在线的VIP】^n_____________________^n"
pos=strlen(opmsg)
for(i=0;i<playerscount;i++){
if(access(playerslist[i],ADMIN_KICK)&&(!access(playerslist[i],ADMIN_IMMUNITY))){
new username[33]
get_user_name(playerslist[i],username,32)
opcount++
pos+=format(opmsg[pos],511-pos,"%s^n",username)
}
}
if(opcount==0) {
opmsg="【当前没有在线VIP】"//We Do not display NO VIP
set_task(0.1,"infoMessage",12345)
return
}
}
|
|