humm..ok updating....
great job, worked well in the last update, thank you for the patience..
regards and thanks again.
Oh I thought you wanted to allow 2 active players, and the 3rd to login would be kicked.
Here is the edited script that only allows 1 active player per IP (no limit on @autotrade merchants).
- script Only1perIP -1,{
OnPCLoginEvent:
if (getgmlevel() >= 99) end;
set .@name$, strcharinfo(0);
if (query_sql("SELECT `char`.`name` FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id WHERE login.last_ip='"+getcharip()+"' AND `char`.online=1 AND `char`.char_id!="+getcharid(0), .@name$) >= 1) {
for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) {
if (checkvending(.@name$[.@i]) != 2)
set .@sameip, .@sameip +1;
}
if (.@sameip >= 1) {
announce "Sorry, only 1 accounts per IP can be logged in at a time.", bc_self;
sleep 1000;
atcommand "@kick " + .@name$;
}
}
end;
}
me again...
I actually have more players in lan house than I imagined, someone could change this query to read a field called last_mac,
would be the same system, only to read the last_mac not ip field.
once again sorry for my bad english.