keough 36 Posted July 26, 2018 Hello I want to have this a restriction by checking the last unique id of a player, because i am using gepard shield 3.0 I dunno how to do it. I want that only 1 account can get this freebies, not multiple account on the same last unique ID. Gepard has last unique id per computer and I want to make a restriction that they can only get on 1 account. Here is the script http://upaste.me/f01850087d4812a40 Hope someone can help! Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted July 26, 2018 check the files given to you by gepard, does it contain any new script commands? there might be one command which would be returning unique id Quote Share this post Link to post Share on other sites
0 keough 36 Posted July 26, 2018 2 hours ago, Dastgir said: check the files given to you by gepard, does it contain any new script commands? there might be one command which would be returning unique id Yes this one? get_unique_id() BUILDIN(get_unique_id) { struct map_session_data* sd = script_rid2sd(st); if (sd == NULL) { script_pushint(st,0); return false; } script_pushint(st, sockt->session[sd->fd]->gepard_info.unique_id); return true; } BUILDIN_DEF(get_unique_id,""), I dunno how to use it. Quote Share this post Link to post Share on other sites
0 Rebel 23 Posted July 26, 2018 try this http://upaste.me/70c850091963a64b9 Quote Share this post Link to post Share on other sites
0 keough 36 Posted July 27, 2018 9 hours ago, Rebel said: try this http://upaste.me/70c850091963a64b9 It's not working... same pc with 2 accounts still can get! I have this no dual on the same map using last_unique_id of gepard. maybe you can check this, It's totally working on my server, It can detect the 2 accounts playing on the same map using last_unique_id and return the 2nd account to the save point. - script dual_client -1,{ OnInit: setarray .@map$[0], "prt_fild08","prt_fild01"; // yours maps no dual for ( .@i = 0; .@i < getarraysize( .@map$ ); .@i++ ) { if ( !getmapflag( .@map$[.@i], mf_loadevent ) ) { setmapflag .@map$[.@i], mf_loadevent; } } .map_list$ = implode( .@map$, "|" ); .@count = query_sql( "select `login`.`last_unique_id`, `char`.`name`, `char`.`char_id` from `login` left join `char` on `char`.`account_id`=`login`.`account_id` where `char`.`online`=1", .@last_uid$, .@name$, .@char_id ); for ( .@i = 0; .@i < .@count; .@i++ ) { getmapxy .@map$, .@x, .@y, 0, .@name$[.@i]; if ( !compare( .map_list$, .@map$ ) ) continue; .@size = 0; .@variable$ = ".uid_"+ .@last_uid$[.@i] +"$"; if ( getd( .@variable$ ) != "" ) { .@size = getarraysize( getd( .@variable$ ) ); for ( .@j = 0; .@j < .@size; .@j++ ) { getmapxy .@map2$, .@x, .@y, 0, getd( .@variable$ +"["+ .@j +"]" ); if ( .@map$ == .@map2$ ) { warpchar "SavePoint",0,0, .@char_id[.@i]; message .@name$[.@i], "No dual account on this map."; break; } } } if ( .@j == .@size ) { setd .@variable$ +"["+ .@size +"]", .@name$[.@i]; } } end; OnPCLoadMapEvent: if ( !compare( .map_list$, strcharinfo(3) ) ) end; .@map$ = strcharinfo(3); .@myname$ = strcharinfo(0); .@variable$ = ".uid_"+ get_unique_id() +"$"; .@size = getarraysize( getd( .@variable$ ) ); for ( .@j = 0; .@j < .@size; .@j++ ) { if ( .@myname$ == getd( .@variable$ +"["+ .@j +"]" ) ) { .@is_in = 1; continue; } getmapxy .@map2$, .@x, .@y, 0, getd( .@variable$ +"["+ .@j +"]" ); .@compare = compare( .map_list$, .@map2$ ); if ( !.@compare ) { .@tmp$ = .@variable$ +"["+ .@j +"]"; deletearray getd( .@tmp$ ), 1; .@size--; } else if ( .@map$ == .@map2$ ) { warpchar "SavePoint",0,0, getcharid(0); message .@myname$, "No dual account on this map."; end; } } if ( !.@is_in ) { setd .@variable$ +"["+ .@size +"]", .@myname$; } end; } Quote Share this post Link to post Share on other sites
Hello
I want to have this a restriction by checking the last unique id of a player, because i am using gepard shield 3.0 I dunno how to do it.
I want that only 1 account can get this freebies, not multiple account on the same last unique ID.
Gepard has last unique id per computer and I want to make a restriction that they can only get on 1 account.
Here is the script
http://upaste.me/f01850087d4812a40
Hope someone can help!
Share this post
Link to post
Share on other sites