10.03.2013, 16:50
Hello all. I'am creating VIP system with time.
There is vip check code:
I create 1 minute timer and I put this code.
I put a 100 minutes, but after one minute my VIP is false...
Can anyone help me?
There is vip check code:
Код HTML:
stock VipCheck2(playerid) { format(jQuery, MAX_QUERY_LENGTH, "SELECT Vipas TIMESTAMPDIFF(MINUTE, NOW(), DATE_ADD(Timesta, INTERVAL Time MINUTE)) FROM vips WHERE Vipas = '%s' AND (NOW() <= DATE_ADD(Timesta, INTERVAL Time MINUTE) OR ban_time = 0)", pName(playerid)); mysql_query(jQuery); mysql_store_result(); new vipas[MAX_PLAYER_NAME],vTime,vresult[1000]; if(mysql_num_rows() < 1) { mysql_fetch_row(vresult); j_sscanf(vresult, "p|si", vipas, vTime); PlayerInfo[playerid][pVip] = false; SendClientMessage(playerid, COLOR_RED,"Jus pasibaige vip galiojimas"); format(jQuery,MAX_QUERY_LENGTH,"DELETE FROM vips WHERE Vipas='%s'",pName(playerid)); mysql_query(jQuery); } return 1; }
I put a 100 minutes, but after one minute my VIP is false...
Can anyone help me?