[Ajuda] Sistema Vip com Vencimento
#1

Pessoal, eu editei o seguinte comando vip...

PHP код:
       if(strcmp(cmd"/darvip"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pAdmin] < 1341)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo tem autorizaзгo para usar esse comando.");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /darvip [id] [Meses]");
                return 
1;
            }
            new 
para1;
            new 
level;
            new 
meses;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
meses strval(tmp);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /darvip [id] [Meses]");
                return 
1;
            }
            
level strval(tmp);
            
GetPlayerName(para1giveplayersizeof(giveplayer));
            
GetPlayerName(playeridsendernamesizeof(sendername));
            if(
IsPlayerConnected(para1))
            {
                if(
para1 != INVALID_PLAYER_ID)
                {
                    if(
level 1)return SendClientMessage(playeridCOLOR_LIGHTBLUE"Vocк nгo pode definir para 0 meses!");
                    
format(stringsizeof string"Vocк deu %d meses de VIP para %s"levelgiveplayer);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    
format(stringsizeof string"Admin %s te deu %d meses de VIP com R$%d e %d Niveis, Aproveite Nossos beneficios!"sendernamelevel15000000*meses3*meses);
                    
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                    
getdate(yearmonthday);
                    
gettime(hour,minute,second);
                    
format(stringsizeof(string), "%s deu vip ao %s nнvel %d (%d/%d/%d - %d:%d)",sendername,giveplayer,level,daymonthyear,hourminute);
                    
VipsLog(string);
                    
PlayerInfo[para1][pLevel] += 3*meses;
                    
PlayerInfo[para1][pVIP] = 1;
                    
GivePlayerMoney(para115000000*meses);
                    
ScoreLevel(para1);
                    
PlayerInfo[para1][pDiaVIP] = day;
                    
PlayerInfo[para1][pMesVIP] = month+level;
                    
PlayerInfo[para1][pAnoVIP] = year;
                    if(
PlayerInfo[para1][pMesVIP] > 12)
                    {
                        
PlayerInfo[para1][pMesVIP] -= 12;
                        
PlayerInfo[para1][pAnoVIP]++;
                    }
                    
OnPlayerSave(para1);
                }
            }
        }
        return 
1;
    } 
Meu problema й: Se eu der 1 mкs de vip hoje: Dia 28/07/2015, o certo seria esse vip acabar Dia 28/08/2015 mas quando chega esta data o vip nгo acaba, alguйm poderia me ajudar?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)