Making Auto VIP Removal
#4

Quote:
Originally Posted by Tayab
Посмотреть сообщение
I kinda got what you said but it'd be better if you explain in a bit different way, maybe an example.

Thanks.
OnPlayerLogin:
pawn Код:
if(timestamp() >= GetPVarInt(playerid,"VIPExpiration"))
{
    SetPVarInt(playerid, "VIP", 0);
    SendClientMessage(playerid, 0xFF0000FF, "Your VIP time has expired.");
}

Whenever you make the player a VIP LEVEL

pawn Код:
SetPVarInt(playerid,"VIPExpiration", timestamp()+2592000); //2592000 seconds means 30 days
You have to save the variable along with the player stats in it's file/db, and load it before the check at onplayerlogin. You need the timestamp() function too. You can change the amount of seconds to whatever you want

3600 Seconds - 1 Hour
86400 Seconds - 1 Day
604800 Seconds - 1 Week (7 days)
2592000 Seconds - 1 Month (30 days)
31536000 Seconds - 1 Year (365 days)
Reply


Messages In This Thread
Making Auto VIP Removal - by Tayab - 31.01.2014, 03:29
Re: Making Auto VIP Removal - by CuervO - 31.01.2014, 03:41
Re: Making Auto VIP Removal - by Tayab - 31.01.2014, 03:51
Re: Making Auto VIP Removal - by CuervO - 31.01.2014, 04:24

Forum Jump:


Users browsing this thread: 1 Guest(s)