Guest User

asd

a guest
Dec 5th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. - script dualclientkicker -1,{
  2. OnPCLoadMapEvent:
  3. set .@charmap$, strcharinfo(3);
  4. if(!compare(.tmp$,.@charmap$)) end;
  5. set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN "+
  6. "(SELECT `account_id` FROM `login` WHERE `last_mac` = "+
  7. "(SELECT `last_mac` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",.@a);
  8. if(.@len-1) {
  9. for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) {
  10. getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d]));
  11. if(.@charmap$==.@map$&&rid2name(.@a[.@d])!=strcharinfo(0)) {
  12. dispbottom "Dual Clients are not allowed in This Map.";
  13. warp "geffen",0,0;
  14. }
  15. }
  16. }
  17. end;
  18.  
  19. OnInit:
  20. setarray .maps$ , "alberta", "gefg_cas01", "payg_cas01", "prtg_cas01";
  21. set .lens , getarraysize(.maps$) ;
  22. for(set(.a,0);.a<.lens;set(.a,.a+1)) {
  23. setmapflag .maps$[.a], mf_loadevent ;
  24. set .tmp$ ,.tmp$+.maps$[.a]+",";
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment