Hello, I am using an IP check/kick script to prevent dual clienting on a certain map. My one problem is that i want to whitelist IPs that have been proven to be actually two individual players and not get kicked by dualing.
How to do that?
- script BG_Check_IP -1,{
OnInit:
setmapflag "arena", mf_loadevent;
end;
// Trigger when a player enters a map with "loadevent" mapflag.
OnPCLoadMapEvent:
// Only run for map "arena".
if (strcharinfo(3) != "arena") end;
// Get list of accounts with attached character's IP address.
set .@size, query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+getcharip()+"'",.@aid);
// Passed check if only the attached player is returned.
if (.@size < 2) end;
// Check all online characters using the IP address if they are on a Battlegrounds map.
set .@self, getcharid(3);
for(set .@i,0; .@i<.@size; set .@i,.@i+1) {
if (.@aid[.@i] == .@self)
continue;
if (attachrid(.@aid[.@i])) {
if (compare(strcharinfo(3),"arena")) {
set .@name$, strcharinfo(0);
attachrid(.@self);
message strcharinfo(0),"Character "+.@name$+" is already present in this map with your IP. Kicking....";
sleep2 2000;
atcommand "@kick "+strcharinfo(0);
end;
}
}
}
// Passed check.
end;
}
Question
Helena
Hello, I am using an IP check/kick script to prevent dual clienting on a certain map. My one problem is that i want to whitelist IPs that have been proven to be actually two individual players and not get kicked by dualing.
How to do that?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.