SA-MP Forums Archive
VIP system - 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 system (/showthread.php?tid=553032)



VIP system - Lidor124 - 27.12.2014

I'm not sure about to make this, a vip system that i can set a temporary vip for someone.
for example: i set for a player for 4 days silver vip, if the player offline or online to the server the time i gave for the vip will pass, and it will write it on the INI file of the player, btw i use YINI of ******.
i know that i should use gettime() getdate() functions but i'm not sure how to use these functions.

Код:
INI_WriteInt(File, "DonateRank", PlayerInfo[playerid][pDonateRank]); // define of vip rank
INI_WriteInt(File, "TempVIP", PlayerInfo[playerid][pTempVIP]); // the temp vip write data



Re: VIP system - LetsOWN[PL] - 27.12.2014

Hello.
Think of this that way:

Player has bought your silver vip, so that he will be able to use it's abilities for 4 days. 4 days equals to 345 600 seconds.

Just make variable which will measure player's time on server (write/read from ini), and check if it exceeds 345 600. If yes, then get the vip away

Greetings.



Re: VIP system - Lidor124 - 28.12.2014

Quote:
Originally Posted by LetsOWN[PL]
Посмотреть сообщение
Hello.
Think of this that way:

Player has bought your silver vip, so that he will be able to use it's abilities for 4 days. 4 days equals to 345 600 seconds.

Just make variable which will measure player's time on server (write/read from ini), and check if it exceeds 345 600. If yes, then get the vip away

Greetings.
Yes i have already got it, its counting down only when the player is online to the server.
I asked even when the server itself offline it will keep counting down.


Re: VIP system - Beckett - 28.12.2014

Read me!