SA-MP Forums Archive
Vip 7 days - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vip 7 days (/showthread.php?tid=655697)



Vip 7 days - wilking - 27.06.2018

why my server . voucher 7 day GVip


7 days vip not lost after 7 days, where is the error when i check there was gettime () .

Look below

Код:
if(GetPVarInt(playerid, "voucherdialog") == 6) // 7 Days Gold VIP
			{
				if(PlayerInfo[playerid][pDonateRank] >= 3)
				{
					DeletePVar(playerid, "voucherdialog");
					DeletePVar(playerid, "WhoIsThis");
					return SendClientMessageEx(playerid, COLOR_GRAD2, "Your VIP Level is already set to Gold+");
				}
				PlayerInfo[playerid][pGVIPExVoucher]--;
				PlayerInfo[playerid][pDonateRank] = 3;
				PlayerInfo[playerid][pTempVIP] = 0;
				PlayerInfo[playerid][pBuddyInvited] = 0;
				PlayerInfo[playerid][pVIPSellable] = 1;
				PlayerInfo[playerid][pVIPExpire] = gettime()+604800*1; // here ( 7 days )
				if(PlayerInfo[playerid][pVIPM] == 0)
				{
					PlayerInfo[playerid][pVIPM] = VIPM;
					VIPM++;
				}
				LoadPlayerDisabledVehicles(playerid);
				new playerip[32];
				GetPlayerIp(playerid, playerip, sizeof(playerip));
				format(string, sizeof(string), "AdmCmd: Server (Voucher System) has set %s's VIP level to Gold (7 Days)(3).", GetPlayerNameEx(playerid));
				ABroadCast(COLOR_LIGHTRED, string, 4);
				format(string, sizeof(string), "You have successfully used one of your 7 Days Gold VIP voucher(s), you have %d 7 Days Gold VIP voucher(s) left.", PlayerInfo[playerid][pGVIPExVoucher]);
				SendClientMessageEx(playerid, COLOR_CYAN, string);
				SendClientMessageEx(playerid, COLOR_GRAD2, "** Note: Your Silver VIP will expire in 7 days.");

				format(string, sizeof(string), "AdmCmd: Server (Voucher System) has set %s's (IP:%s) VIP level to Gold (7 Days)(3) (Voucher Left: %d)", GetPlayerNameEx(playerid), playerip, PlayerInfo[playerid][pGVIPExVoucher]);
				Log("logs/vouchers.log", string);
				OnPlayerStatsUpdate(playerid);
			}



Re: Vip 7 days - wilking - 27.06.2018

somebody help me . tks so much


Re: Vip 7 days - Awide - 27.06.2018

Please repeat your problem in English.


Re: Vip 7 days - wilking - 27.06.2018

sory , i bad english .

problem : My vip 7 day is has error when used. A 7 day vip voucher has been calculated as 604800 s. but not right. I think my server lacks something so it works well.


Re: Vip 7 days - UFF - 28.06.2018

Код:
 PlayerInfo[playerid][pVIPExpire] = gettime() + 86400 * 7  (7 days)