andrew0960 Posted November 21, 2016 Group: Members Topic Count: 21 Topics Per Day: 0.01 Content Count: 37 Reputation: 0 Joined: 09/21/16 Last Seen: January 10, 2019 Share Posted November 21, 2016 hi i need some help to create a script that avoid multiple same ip on a instance map. i tried the script below, but it doesnt work because its not reading the instance id..and im not sure how to do that. (using @Secrets MVP Ladder) - script abcde#2 -1,{ OnPCLoadMapEvent: getmapxy(.@amap$,.@mapx,.@mapy,0); if(.@amap$!="guild_vs2-2") end; query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@LastIp$); query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@LastIp$+"'", .@AccountId); set .@aidtemp,getcharid(3,strcharinfo(0)); for(set .@i ,0;.@i<getarraysize(.@AccountId);set .@i,.@i+1) { if(attachrid(.@AccountId[.@i])) { getmapxy(.@qmap$,.@qmapx,.@qmapy,0); if (.@qmap$== .@amap$) set .@j,.@j+1; } detachrid; } attachrid .@aidtemp; if(.@j > $@MaxWimdows) warp "SavePoint",0,0; end; OnInit: set $@MaxWimdows,1; end; } //------Enable map OnPCLoadMapEvent------------------- guild_vs2-2 mapflag loadevent Quote Link to comment Share on other sites More sharing options...
Question
andrew0960
hi i need some help to create a script that avoid multiple same ip on a instance map.
i tried the script below, but it doesnt work because its not reading the instance id..and im not sure how to do that. (using @Secrets MVP Ladder)
Link to comment
Share on other sites
0 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.