SA-MP Forums Archive
[Help] Limited Time Jetpack - 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: [Help] Limited Time Jetpack (/showthread.php?tid=553502)



[Help] Expiration - Arxalan - 30.12.2014

Hello , i need help with the following command . Will somebody tell me what is 60*60*24*7?

PHP код:
    User[playerid][ExpirationVIP] = gettime() + 60*60*24*7



Re: [Help] Limited Time Jetpack - DavidBilla - 30.12.2014

7-days
24-hours
60-minutes
60-seconds

It's converting a week's time to seconds


Re: [Help] Limited Time Jetpack - Arxalan - 30.12.2014

Following is my Command for Buying VIP

PHP код:
if(pp >= 50)
                        {
                            if(
User[playerid][accountVIP] == 1) return SendClientMessage(playerid, -1""red"[PREMIUM] "white"You already have VIP.");
                            
User[playerid][accountPP] -= 50;
                            
User[playerid][accountVIP] = 1;
                            
User[playerid][ExpirationVIP] = gettime() + 60*60*24*7;
                            
SendClientMessage(playerid, -1""red"[PREMIUM] "white"You have bought the VIP, Now you have access to VIP stuffs, It will expire in the 7th day.");
                            
format(string3sizeof(string3), ""red"[PREMIUM] "white"You have spent "grey"50 PP "white"for this item, You have "grey"%d "white"remaining PP."User[playerid][accountPP]);
                            
SendClientMessage(playerid, -1string3);
                            
                            
format(string3128"%s has bought the Very Important Person Item from the Premium Shop, Expiration date is 7 days."GetName(playerid));
                            
Log("premium.txt"string3);
                        }
                        else
                        {
                            
cmd_premiumshop(playerid"");
                            
SendClientMessage(playerid, -1""red"[PREMIUM] "white"You do not have 50 PP to buy this item.");
                        } 
as it have 7 days to expire but it expires after relogging 2 or 3 times and also OnPlayerDisconnect don't have command to save it . Please give me the code to save it after disconnection.