Vip with limited time
#4

pawn Код:
#define IsPlayerVip(%0)             (gettime() < pVipExpiry[%0])
#define ExtendPlayerVip(%0,%1)      if(pVipExpiry[%0] > gettime()) pVipExpiry[%0] += (86400 * %1); else pVipExpiry[%0] = (gettime() + (86400 * %1))

new pVipExpiry[MAX_PLAYERS];
Use ExtendPlayerVip(playerid,days); in your /makevip command.
Use if(IsPlayerVip(playerid)) in your vip commands, it returns 1 if the player is vip or 0 if not.

Don't forget to store the expiry date somewhere, and load / save it.
Reply


Messages In This Thread
Vip with limited time - by ChristianIvann09 - 06.04.2014, 06:05
Re: Vip with limited time - by ]Rafaellos[ - 06.04.2014, 06:08
Re: Vip with limited time - by ChristianIvann09 - 06.04.2014, 06:29
Re: Vip with limited time - by xXShadowXx - 06.04.2014, 06:51
Re: Vip with limited time - by ChristianIvann09 - 06.04.2014, 07:41

Forum Jump:


Users browsing this thread: 1 Guest(s)