24.07.2016, 19:00
What is worng with my VIP system? Everytime I relog say:
"Your VIP expired!"
ADD VIP FUNC
Check if end VIP
"Your VIP expired!"
ADD VIP FUNC
Код:
stock AddVIP(playerid, days, price) { if(DP[playerid] < price) { new string[50]; format(string, sizeof(string), "You do not have %i Donate Points", price ); SendClientMessage(playerid, COLOR_LIGHTRED, string); } else { DP[playerid] -= price; VIP[playerid] = 1; if(expirarVIP[playerid] > 0) { expirarVIP[playerid] += (days * 86400); } // already have VIP else { expirarVIP[playerid] = gettime() + (days * 86400); } // dont have VIP } }
Код:
if(gettime() < expirarVIP[playerid]) { if(idiom[playerid] == 1) { SendClientMessage(playerid, COLOR_LIGHTRED, "Sua VIP expirou!"); } else if(idiom[playerid] == 2) { SendClientMessage(playerid, COLOR_LIGHTRED, "Your VIP expired!"); } VIP[playerid] = 0; expirarVIP[playerid] = 0; }