Multiplying costs.
#3

Ok i made that and now my script just spams the hell out of the messages like a loop.
Heres the script:
PHP код:
if(dialogid == 169)
{
    if(
response)
    {
        
TogglePlayerControllable(playerid1);
        new 
TCarModel GetVehicleModel(carroapresentar[playerid]);
        
escolhacombustivel[playerid] = 1;
        new 
valorveiculo TCarModel-400;
        new 
precoveiculo VehiclePrices[valorveiculo][0];
        if(
listitem == 0)
        {
            
tipocombustivel[playerid] = 1;
        }
        if(
listitem == 1)
        {
            
tipocombustivel[playerid] = 2;
            
precoveiculo floatround(precoveiculo*0.9);
        }
            for(new 
c=0;c<MAX_VEHICLES;c++)
            {
                if(
DynamicCars[c][comprado] != 0) continue;
                if(
DynamicCars[c][valor] != 0) continue;
                if(
DynamicCars[c][buy] != 1) continue;
                if(
DynamicCars[c][CarModel] != 481) continue;
                if(!
IsValidModel(TCarModel))
                    return 
SendClientMessage(playeridCOLOR_RED,"{FF0000}[Erro]: {FFFFFF}Modelo Invбlido.");
                
SendClientMessage(playeridCOLOR_GREY"========================================================================================================");
                
SendClientMessage(playeridCOLOR_WHITE"Compraste o veiculo com sucesso. Este aparecerб na marinha de Palomino Creek em 10 horas ingame");
                
SendClientMessage(playeridCOLOR_GREY"========================================================================================================");
                
SetTimerEx("buyvehtime"2000false"iii"playeridTCarModelc);
                if(
PlayerInfo[playerid][pVipActive] != 0)
                {
                    
GivePlayerEuros(playerid, -precoveiculo/2);
                    
Businesses[1][Products]=Businesses[1][Products]-(precoveiculo/2/100);
                       
Businesses[1][Till]+=precoveiculo;
                    
OnPlayerDataSave(playerid);
                }
                else
                {
                    
GivePlayerEuros(playerid, -precoveiculo);
                    
Businesses[1][Products]=Businesses[1][Products]-(precoveiculo/100);
                       
Businesses[1][Till]+=precoveiculo;
                }
                if(
PlayerInfo[playerid][pChave1] == 255)
                {
                       
PlayerInfo[playerid][pChave1] = c+1;
                      return 
1;
                }
                else if(
PlayerInfo[playerid][pChave2] == 255)
                {
                      
PlayerInfo[playerid][pChave2] = c+1;
                    return 
1;
                }
                else if(
PlayerInfo[playerid][pChave3] == 255)
                {
                    
PlayerInfo[playerid][pChave3] = c+1;
                    return 
1;
                }
                else if(
PlayerInfo[playerid][pChave4] == 255)
                {
                    
PlayerInfo[playerid][pChave4] = c+1;
                    return 
1;
                }
                else if(
PlayerInfo[playerid][pChave5] == 255)
                {
                    
PlayerInfo[playerid][pChave5] = c+1;
                      return 
1;
                }
                else if(
PlayerInfo[playerid][pChave6] == 255)
                {
                   
PlayerInfo[playerid][pChave6] = c+1;
                   return 
1;
                }
            }
            return 
1;
    }

Reply


Messages In This Thread
Multiplying costs. - by GunZsmd - 16.05.2016, 18:07
Re: Multiplying costs. - by AbyssMorgan - 16.05.2016, 18:10
Re: Multiplying costs. - by GunZsmd - 16.05.2016, 18:42

Forum Jump:


Users browsing this thread: 1 Guest(s)