Jump to content
  • 0

pomoc VIP


Wap3riX

Dotaz

Čau, jak se dá udělat jednoduchý VIP systém, abych tam mohl nastavit na jak dlouho VIP bude, a nějaké vlastní příkazy pro VIP. Napište buď sem, nebo dejte alespoň link na nějaký TUT. Díky

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0
stock mktime(hour,minute,second,day,month,year) {
new timestamp2;
timestamp2 = second + (minute * 60) + (hour * 3600);
new days_of_month[12];
if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) {
days_of_month = {31,29,31,30,31,30,31,31,30,31,30,31}; // Schaltjahr
} else {
days_of_month = {31,28,31,30,31,30,31,31,30,31,30,31}; // keins
}
new days_this_year = 0;
days_this_year = day;
if(month > 1) { // No January Calculation, because its always the 0 past months
for(new i=0; i<month-1;i++) {
days_this_year += days_of_month[i];
}
}
timestamp2 += days_this_year * 86400;


for(new j=1970;j<year;j++) {
timestamp2 += 31536000;
if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) )  timestamp2 += 86400; // Schaltjahr + 1 Tag
}


return timestamp2;
}

ulož si do souboru 

gettime() + mktime(hodiny,minuty,sekundy,dny,měsíce,roky); //doplň si sám

a při připojení kontroluj ->

if(gettime() > uložený čas)
{
    //smazat vip
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...