Anime s2 Posted November 4, 2015 Posted November 4, 2015 Can someone tells me what is the best way to compare last macs ? OnPCLoginEvent: setarray .@mac_list$[0],"bc:ee:7b:57:b4:2","bc:ee:7b:58:b4:2"; query_sql("SELECT `last_mac` FROM `login` WHERE `account_id` = '" + getcharid(3) + "'", .@mac_ip$); for (set .@i,0; .@i < getarraysize( .@mac_list$ ); set .@i , .@i + 1 ) { if (.@mac_ip$ == .@mac_list$[.@i]) { set .@jailok,1; } } if(.@jailok) atcommand "@jail " + strcharinfo(0); Problem: multiple messages : "player jailed" is there another way? sorry for my bad english. Quote
Haziel Posted November 4, 2015 Posted November 4, 2015 I could not understand the point on your request.When It is needed to compare MACs? It is to block Dual Account?And what is supposed to happens when two MACs are equal? Quote
Anime s2 Posted November 5, 2015 Author Posted November 5, 2015 I did this script to compare the mac address of players with defined in array. If the result works, the player will be sent for the jail up Quote
Haziel Posted November 5, 2015 Posted November 5, 2015 Hmm, try this: OnPCLoginEvent: setarray .@mac_list$[0],"bc:ee:7b:57:b4:2","bc:ee:7b:58:b4:2"; query_sql("SELECT `last_mac` FROM `login` WHERE `account_id` = '" + getcharid(3) + "'", .@mac_ip$); for (set .@i, 0; .@i < getarraysize(.@mac_list$); set .@i, .@i + 1){ if (.@mac_ip$ == .@mac_list$[.@i]){ atcommand "@jail " + strcharinfo(0); break; } } end; Quote
Anime s2 Posted November 6, 2015 Author Posted November 6, 2015 Hmm, try this: OnPCLoginEvent: setarray .@mac_list$[0],"bc:ee:7b:57:b4:2","bc:ee:7b:58:b4:2"; query_sql("SELECT `last_mac` FROM `login` WHERE `account_id` = '" + getcharid(3) + "'", .@mac_ip$); for (set .@i, 0; .@i < getarraysize(.@mac_list$); set .@i, .@i + 1){ if (.@mac_ip$ == .@mac_list$[.@i]){ atcommand "@jail " + strcharinfo(0); break; } } end; http://postimg.org/image/srrv7q4nd/ Quote
Emistry Posted November 7, 2015 Posted November 7, 2015 your probably loaded/duplicate the same script multiple time ? Quote
Question
Anime s2
Can someone tells me what is the best way to compare last macs ?
Problem:
multiple messages : "player jailed"
is there another way?
sorry for my bad english.
5 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.