try use this
- script dualclientkicker -1,{
OnPCLoadMapEvent:
set .@charmap$, strcharinfo(3);
if(!compare(.tmp$,.@charmap$)) end;
set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE`account_id` IN (SELECT `account_id` FROM `login` WHERE `last_ip` =(SELECT `last_ip` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND`online` <> 0;",.@a);
for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) {
if(!getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d])) && .@charmap$==.@map$)
set .@c,.@c+ 1;
}
if(.@c > .limitacc ) {
dispbottom "Dual accounts not allowed in PVP.";
warp "geffen",0,0;
}
end;
OnInit:
set .limitacc,1;
setarray .maps$, "valkyrie_vs", "pvp_y_1-2", "prt_pvp", "bat_cc2";
set .lens , getarraysize(.maps$) ;
for(set(.a,0);.a<.lens;set(.a,.a+1)) {
setmapflag .maps$[.a], mf_loadevent ;
set .tmp$ ,.tmp$+.maps$[.a]+",";
}
}