15.05.2016, 09:15
So i did that and i found out that nothing really happens when u press those buttons. I removed the bizz thing and replaced directly with the bizz id imma leave here what i did:
From all those sendclientmessage only the first one works. Why is the script returning after the response?
PHP код:
if(dialogid == 169)
{
if(response)
{
SendClientMessage(playerid, COLOR_RED, "test");
new TCarModel = carroapresentar[playerid];
escolhacombustivel[playerid] = 1;
new valorveiculo = TCarModel-400;
new precoveiculo = VehiclePrices[valorveiculo][0];
if(listitem == 0)
{
tipocombustivel[playerid] = 1;
SendClientMessage(playerid, COLOR_RED, "op1");
}
if(listitem == 1)
{
tipocombustivel[playerid] = 2;
SendClientMessage(playerid, COLOR_RED, "op2");
precoveiculo *= 0.9;
}
SendClientMessage(playerid, COLOR_RED, "test999");
for(new c=0;c<MAX_VEHICLES;c++)
{
if(DynamicCars[c][comprado] != 0) continue;
SendClientMessage(playerid, COLOR_RED, "test5");
if(DynamicCars[c][valor] != 0) continue;
SendClientMessage(playerid, COLOR_RED, "test6");
if(DynamicCars[c][buy] != 1) continue;
SendClientMessage(playerid, COLOR_RED, "test7");
if(DynamicCars[c][CarModel] != 481) continue;
SendClientMessage(playerid, COLOR_RED, "test8");
if(!IsValidModel(TCarModel))
return SendClientMessage(playerid, COLOR_RED,"{FF0000}[Erro]: {FFFFFF}Modelo Invбlido.");
SendClientMessage(playerid, COLOR_GREY, "========================================================================================================");
SendClientMessage(playerid, COLOR_WHITE, "Compraste o veiculo com sucesso. Este aparecerб na marinha de Palomino Creek em 10 horas ingame");
SendClientMessage(playerid, COLOR_GREY, "========================================================================================================");
SetTimerEx("buyvehtime", 2000, false, "iii", playerid, TCarModel, c);
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;
}
}