/sellprods log problem
#1

hi does anyone know on what line can I add log??


PHP код:
    if(strcmp(cmd"/sellprods"true) == 0)
    {
        new 
cashmade;
        new 
tmpcar;
        if(
IsPlayerConnected(playerid))
        {
            
tmpcar GetPlayerVehicleID(playerid);
            if(!
IsATruck(tmpcar))
            {
                
GameTextForPlayer(playerid"~r~You are not in a delivery truck"50001);
                return 
1;
            }
            if(
PlayerHaul[tmpcar][pLoad] == 0)
            {
                
GameTextForPlayer(playerid"~r~Truck is empty, return to the stock house"50001);
                
format(stringsizeof(string), "Products: %d/%d."PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                return 
1;
            }
            for(new 
0sizeof(BizzInfo); i++)
            {
                if (
IsPlayerInRangeOfPoint(playerid10,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
                {
                    
//printf("Found House :%d",i);
                    
for(new PlayerHaul[tmpcar][pLoad]; 0l--)
                    {
                        if(
BizzInfo[i][bProducts] == BizzInfo[i][bMaxProducts])
                        {
                            
GameTextForPlayer(playerid"~r~Our stores are full"50001);
                            
format(stringsizeof(string), "Cash Earned $%d."cashmade);
                            
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                            
format(stringsizeof(string), "Products: %d/%d."PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                            
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                            
PlayerPlaySound(playerid10520.00.00.0);
                            return 
1;
                        }
                        if(
BizzInfo[i][bPriceProd] > BizzInfo[i][bTill])
                        {
                            
GameTextForPlayer(playerid"~r~We Cant Afford The Deal"50001);
                            
format(stringsizeof(string), "Cash Earned $%d."cashmade);
                            
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                            
format(stringsizeof(string), "Products: %d/%d."PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                            
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                            
PlayerPlaySound(playerid10520.00.00.0);
                            return 
1;
                        }
                        
PlayerHaul[tmpcar][pLoad]--;
                        
BizzInfo[i][bProducts]++;
                        
cashmade cashmade+BizzInfo[i][bPriceProd];
                        
//ConsumingMoney[playerid] = 1;
                        
SafeGivePlayerMoney(playerid,BizzInfo[i][bPriceProd]);
                        
BizzInfo[i][bTill] -= BizzInfo[i][bPriceProd];
                        if(
PlayerHaul[tmpcar][pLoad] == 0)
                        {
                            
GameTextForPlayer(playerid"~r~Truck is empty, return to the stock house"50001);
                            
format(stringsizeof(string), "Cash Earned $%d."cashmade);
                            
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                            
format(stringsizeof(string), "Products: %d/%d."PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                            
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                            
PlayerPlaySound(playerid10520.00.00.0);
                            return 
1;
                        }
                    }
                    
OnPropUpdate(3,i);
                    return 
1;
                }
            }
        }
        for(new 
0sizeof(SBizzInfo); i++)
        {
            if (
IsPlayerInRangeOfPoint(playerid10,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
            {
                
//printf("Found House :%d",i);
                
for(new PlayerHaul[tmpcar][pLoad]; 0l--)
                {
                    if(
SBizzInfo[i][sbProducts] == SBizzInfo[i][sbMaxProducts])
                    {
                        
GameTextForPlayer(playerid"~r~Our stores are full"50001);
                        
format(stringsizeof(string), "Cash Earned $%d."cashmade);
                        
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                        
format(stringsizeof(string), "Products: %d/%d."PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                        return 
1;
                    }
                    if(
SBizzInfo[i][sbPriceProd] > SBizzInfo[i][sbTill])
                    {
                        
GameTextForPlayer(playerid"~r~We Cant Afford The Deal"50001);
                        
format(stringsizeof(string), "Cash Earned $%d."cashmade);
                        
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                        
format(stringsizeof(string), "Products: %d/%d."PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                        return 
1;
                    }
                    
PlayerHaul[tmpcar][pLoad]--;
                    
SBizzInfo[i][sbProducts]++;
                    
cashmade cashmade+SBizzInfo[i][sbPriceProd];
                    
//ConsumingMoney[playerid] = 1;
                    
SafeGivePlayerMoney(playerid,SBizzInfo[i][sbPriceProd]);
                    
SBizzInfo[i][sbTill] -= SBizzInfo[i][sbPriceProd];
                    if(
PlayerHaul[tmpcar][pLoad] == 0)
                    {
                        
GameTextForPlayer(playerid"~r~Truck is empty, return to the stock house"50001);
                        
format(stringsizeof(string), "Cash Earned $%d."cashmade);
                        
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                        
format(stringsizeof(string), "Products: %d/%d."PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
                        
SendClientMessage(playeridTEAM_GROVE_COLORstring);
                        return 
1;
                    }
                }
                
OnPropUpdate(3,i);
                return 
1;
            }
        }
        
GameTextForPlayer(playerid"~r~To Far From A Business"50001);
        return 
1;
    } 
Reply


Messages In This Thread
/sellprods log problem - by Ugaustin - 16.06.2015, 10:27
Re: /sellprods log problem - by Ugaustin - 16.06.2015, 11:21
Re: /sellprods log problem - by Matess - 16.06.2015, 11:31
Re: /sellprods log problem - by bgedition - 16.06.2015, 11:31
Re: /sellprods log problem - by Ugaustin - 16.06.2015, 15:17
Re: /sellprods log problem - by Stanford - 16.06.2015, 16:12
Re: /sellprods log problem - by Ugaustin - 16.06.2015, 17:13
Re: /sellprods log problem - by Ugaustin - 16.06.2015, 17:35

Forum Jump:


Users browsing this thread: 1 Guest(s)