[Ajuda] Bug Payday
#1

ajudaaa, tou com um bug no payday, ele nunca acontece, eu ja tentei de tudo tudo mesmo, mim ajudeem

PHP код:
public PayDay()
{
    new 
string[128];
    new 
Conta,interest;
    new 
rent 0;
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i) && !IsPlayerNPC(i))
        {
            if(
PlayerInfo[i][pLevel] > 0)
            {
                if(
MoneyMessage[i]==1)
                {
                    
SendClientMessage(iCOLOR_LIGHTRED"Vocк nгo pagou a sua dнvida e foi preso.");
                    
GameTextForPlayer(i"~r~Preso!"20001);
                    
SetPlayerInterior(i6);
                       
SetPlayerPos(i264.6288,77.5742,1001.0391);
                    
PlayerInfo[i][pJailed] = 1;
                    
ResetPlayerWeaponsEx(i);
                    
WantedPoints[i] = 0;
                      
SetPlayerWantedLevel(i0);
                    
PlayerInfo[i][pJailTime] = 600;
                    
format(gstringsizeof(gstring), "Vocк foi preso por %d segundos."PlayerInfo[i][pJailTime]);
                    
SendClientMessage(iCOLOR_LIGHTBLUEgstring);
                }
                new 
playername2[MAX_PLAYER_NAME];
                
GetPlayerName(iplayername2sizeof(playername2));
                
Conta PlayerInfo[i][pConta];
                new 
key PlayerInfo[i][pPHousekey];
                if(
key != 255)
                {
                    
rent HouseInfo[key][hRent];
                    if(
strcmp(playername2HouseInfo[key][hOwner], true) == 0)
                    {
                        
rent 0;
                    }
                    else if(
rent GetPlayerMoneyEx(i))
                    {
                        
PlayerInfo[i][pPHousekey] = 255;
                        
SendClientMessage(iCOLOR_WHITE"Vocк foi expulso(a).");
                        
rent 0;
                    }
                    
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
                }
                new 
tmpintrate;
                if(
PlayerInfo[i][pVIP] == 1) { tmpintrate 3; }
                else if(
PlayerInfo[i][pVIP] == 2) { tmpintrate 4; }
                else { 
tmpintrate 1; }
                if(
PlayerInfo[i][pPayDay] >= 3)
                {
                    
Tax += TaxValue;//Shorld work for every player On-Line
                    
PlayerInfo[i][pConta] -= TaxValue;
                    new 
checks PlayerInfo[i][pSalario];
                    new 
ebill = (PlayerInfo[i][pConta]/15000)*(PlayerInfo[i][pLevel]);
                    new 
wbill = (PlayerInfo[i][pConta]/25000)*(PlayerInfo[i][pLevel]);
                    
ConsumingMoney[i] = 1;
                    
GivePlayerMoneyEx(ichecks);
                    if(
PlayerInfo[i][pConta] > 0)
                    {
                        
PlayerInfo[i][pConta] -= ebill;
                        
SBizzInfo[4][sbTill] += ebill;
                         
PlayerInfo[i][pConta] -= wbill;
                        
SBizzInfo[4][sbTill] += wbill;
                    }
                    else
                    {
                        
ebill 0;
                    }
                    
interest = (PlayerInfo[i][pConta]/1000)*(tmpintrate);
                    
PlayerInfo[i][pExp]++;
                    
PlayerPlayMusic(i);
                    
PlayerInfo[i][pConta] = Conta+interest;
                    
SendClientMessage(iCOLOR_GRAD2"{ADFF2F}( • • • • • • • • • • • • • • • • • •[ {69C7E4}Pagamento{ADFF2F} ]• • • • • • • • • • • • • • • • • • )");
                    
format(gstringsizeof(gstring), "  Salбrio: R$%d   Imposto: -R$%d"checksTaxValue);
                    
SendClientMessage(iCOLOR_GRAD1gstring);
                    
SendClientMessage(iCOLOR_GRAD1"  Mйdico: R$300");
                    if(
PlayerInfo[i][pPHousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
                    {
                        
format(gstringsizeof(gstring), "  Energia: -R$%d"ebill);
                        
SendClientMessage(iCOLOR_GRAD1gstring);
                          
format(gstringsizeof(gstring), "  Бgua: -R$%d"wbill);
                        
SendClientMessage(iCOLOR_GRAD1gstring);
                    }
                    
format(gstringsizeof(gstring), "  Banco: R$%d"Conta);
                    
SendClientMessage(iCOLOR_GRAD1gstring);
                    
format(gstringsizeof(gstring), "  Juros: 0.%d  por cento",tmpintrate);
                    
SendClientMessage(iCOLOR_GRAD2gstring);
                    
SendClientMessage(iCOLOR_GRAD2"{ADFF2F}( • • • • • • • • • • • • • • • • • •[ {69C7E4}BLS{ADFF2F} ]• • • • • • • • • • • • • • • • • • )");
                    
format(gstringsizeof(gstring), "  Novo extrato: R$%d"PlayerInfo[i][pConta]);
                    
SendClientMessage(iCOLOR_GRAD5gstring);
                    
format(gstringsizeof(gstring), "  Aluguel: -R$%d"rent);
                    
SendClientMessage(iCOLOR_GRAD5gstring);
                    
format(gstringsizeof(gstring), "~w~Salario");
                    
GameTextForPlayer(igstring50001);
                    
GivePlayerMoneyEx(i,- 300);
                    
OnPlayerSave(i);
                    
rent 0;
                    
PlayerInfo[i][pPoint] += numplayers;
                    
format(stringsizeof(string), "{ff9600}Vocк ganhou {fff000}%d Cash {ff9600}por ter {fff000}%d {ff9600}Jogadores Online"numplayers,numplayers);
                    
SendClientMessage(iCOLOR_GRAD5string);
                    
PlayerInfo[i][pPayDay] = 0;
                    
PassadoUmDia++;
                    
PlayerInfo[i][pSalario] = 0;
                    
PlayerInfo[i][pCaixinha] = 0;
                    
PlayerInfo[i][pConnectTime] += 1;
                    
pban[i] = 0;
                    if(
PlayerInfo[i][pVIP] == 1)
     {
                        
PlayerInfo[i][pExp] += 2;
                        
GivePlayerMoneyEx(i,20000);
                        
SendClientMessage(i,COLOR_LIGHTPINK,"Vocк recebeu 20k de bфnus por ser vip.");
                    }
                    else if(
PlayerInfo[i][pVIP] == 2)
                    {
                        
PlayerInfo[i][pExp] += 4;
                        
GivePlayerMoneyEx(i,40000);
                        
SendClientMessage(i,COLOR_LIGHTPINK,"Vocк recebeu 40k de bфnus por ser super vip.");
                    }
                    else if(
PlayerInfo[i][pTimeVIP] >= 1)
                    {
                        
PlayerInfo[i][pExp] += 1;
                        
GivePlayerMoneyEx(i,15000);
                        
SendClientMessage(i,COLOR_LIGHTPINK,"Vocк recebeu 15k de bфnus por ser vip Timer.");
                    }
                    else if(
PlayerInfo[i][pSocio] >= 1)
                    {
                        
PlayerInfo[i][pExp] += 6;
                        
GivePlayerMoneyEx(i,50000);
                        
SendClientMessage(i,COLOR_LIGHTPINK,"Vocк recebeu 50k de bфnus por ser socio.");
                    }
                    if(
PlayerInfo[i][pEmprego] > 0)
                    {
                        if(
PlayerInfo[i][pContractTime] < 25)
                        {
                            
PlayerInfo[i][pContractTime] ++;
                        }
                    }
                }
                else
                {
                    
SendClientMessage(iCOLOR_LIGHTRED"* Vocк nгo jogou tempo suficiente para receber salбrio!.");
                } 
Reply
#2

Chame um timer para executar a callback
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)