MikZ 5 Posted November 6, 2018 (edited) Good day! I am trying to add VIP warper function in the script and found this command. function VIP { if ( getarg(0) > getgmlevel() ) { if (getarg(1,0)) { @vip_block = 0; for (.@i = 1; .@i < getargcount(); .@i++) @vip_block = @vip_block | (1<<getarg(.@i)); } else { message strcharinfo(PC_NAME),"Only VIP have access in this map."; close; } } return; } My question is how can i apply/change the script to work on this query, query below is for VIP players. thanks! query_sql( "SELECT CAST( `vip` AS DATE ),DATEDIFF( IFNULL(`vip`,NOW()),NOW() ),`last_unique_id`,`last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1", .@vip_date$, .@day, .@last_u_id$, .@last_ip$ ); if ( .@day > 0 ) { dispbottom "VIP Exp & item rate and Expire at "+.@vip_date$+"."; } end; } Edited November 6, 2018 by MikZ Quote Share this post Link to post Share on other sites
0 MikZ 5 Posted November 10, 2018 anyone please? Quote Share this post Link to post Share on other sites
Good day!
I am trying to add VIP warper function in the script and found this command.
function VIP { if ( getarg(0) > getgmlevel() ) { if (getarg(1,0)) { @vip_block = 0; for (.@i = 1; .@i < getargcount(); .@i++) @vip_block = @vip_block | (1<<getarg(.@i)); } else { message strcharinfo(PC_NAME),"Only VIP have access in this map."; close; } } return; }
My question is how can i apply/change the script to work on this query, query below is for VIP players. thanks!
query_sql( "SELECT CAST( `vip` AS DATE ),DATEDIFF( IFNULL(`vip`,NOW()),NOW() ),`last_unique_id`,`last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1", .@vip_date$, .@day, .@last_u_id$, .@last_ip$ ); if ( .@day > 0 ) { dispbottom "VIP Exp & item rate and Expire at "+.@vip_date$+"."; } end; }
Share this post
Link to post
Share on other sites