PHP код:
if(dialogid == VeiculosCasas)
{
if(response)
{
if(listitem == 0)
{
new Lista1 []= "Admiral - Preзo $30.000\nAlpha - Preзo $30.000\nBanshee - Preзo $60.000\nBandito - Preзo $35.000\nBF-400 - Preзo $25.000\nBF-Injection - Preзo $5.000\nBike - Preзo $500\nBlade - Preзo $40.000\nBlista Compact - Preзo $15.000\nBloodring Banger - Preзo $45.000\nBmx - Preзo $1.000\nBobcat - Preзo $32.000\n<- Voltar";
ShowPlayerDialog(playerid, VeiculosLista1, DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 1",Lista1,"Comprar","Cancelar");
}
if(listitem == 1)
{
new Lista2 []= "Baggage - $Preзo 9.000\nBoxville - Preзo $26.000\nBravura - Preзo $33.000\nBroadway - Preзo $44.000\nBuccaneer - Preзo $40.000\nBuffalo - Preзo $75.000\nBullet - Preзo $80.000\nBurrito - Preзo $48.000\nCadrona - Preзo $37.000\nCaddy - Preзo $13.000\nCamper - Preзo $28.000\nCheetah - Preзo $95.000\n<- Voltar";
ShowPlayerDialog(playerid, VeiculosLista2, DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 2",Lista2,"Comprar","Cancelar");
}
if(listitem == 2)
{
new Lista3 []= "Clover - Preзo $43.000\nClub - Preзo $47.000\nComet - Preзo $18.000\nElegant - Preзo $49.000\nElegy - Preзo $78.000\nEmperor - Preзo $55.000\nEsperanto - Preзo $22.000\nEuros - Preзo $64.000\nFaggio - Preзo $3.000\nFCR-900 - $32.000\nFeltzer - Preзo $23.000\nFlash - Preзo $62.000\n<- Voltar";
ShowPlayerDialog(playerid, VeiculosLista3, DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 3",Lista3,"Comprar","Cancelar");
}
if(listitem == 3)
{
new Lista4 []= "Fortune - Preзo $34.000\nForklift - Preзo $6.000\nFreeway - Preзo $22.000\nGlendale - Preзo $26.000\nGreenwood - Preзo $20.000\nHermes - Preзo $41.000\nHotdog - Preзo $28.000\nHotknife - Preзo $66.000\nHotring - Preзo $90.000\nHuntley - Preзo $65.000\nHustler - Preзo $59.000\nInfernus - Preзo $90.000\n<- Voltar";
ShowPlayerDialog(playerid, VeiculosLista4, DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 4",Lista4,"Comprar","Cancelar");
}
if(listitem == 4)
{
new Lista5 []= "Intruder - Preзo $29.000\nJester - Preзo $72.000\nJourney - Preзo $85.000\nKart - Preзo $14.000\nLandstalker - Preзo $65.000\nMajestic - Preзo $17.000\nManana - Preзo $22.000\nMerit - Preзo $39.000\nMesa - Preзo $56.000\nMoonbeam - Preзo $51.000\nMower - Preзo $15.000\n<- Voltar";
ShowPlayerDialog(playerid, VeiculosLista5, DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 5",Lista5,"Comprar","Cancelar");
}
if(listitem == 5)
{
new Lista6 []= "Mule - Preзo $42.000\nNebula - Preзo $33.000\nNRG-500 - Preзo $55.000\nOceanic - Preзo $24.000\nPCJ-600 - Preзo $38.000\nPerenniel - Preзo $19.000\nPhoenix - Preзo $83.000\nPicador - Preзo $21.000\nPony - Preзo $39.000\nPremier - Preзo $31.000\nPrevion - Preзo $36.000\nPrimo - Preзo $34.000\n<- Voltar";
ShowPlayerDialog(playerid, VeiculosLista6, DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 6",Lista6,"Comprar","Cancelar");
}
if(listitem == 6)
{
new Lista7 []= "Quad - Preзo $10.000\nRancher - Preзo $84.000\nRegina - Preзo $27.000\nRemington - Preзo $57.000\nRomero - Preзo $53.000\nRumpo - Preзo $38.000\nSabre - Preзo $22.000\nSadler - Preзo $14.000\nSanchez - Preзo $6.000\nSandking - Preзo $80.000\nSavanna - Preзo $39.000\nSlamvam - Preзo $25.000\n<- Voltar";
ShowPlayerDialog(playerid, VeiculosLista7, DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 7",Lista7,"Comprar","Cancelar");
}
if(listitem == 7)
{
new Lista8 []= "Solair - Preзo $40.000\nStafford - Preзo $45.000\nStallion - Preзo $22.000\nStratum - Preзo $56.000\nStretch - Preзo $20.000\nSultan - Preзo 64.000\nSunrise - Preзo $51.000\nSuper GT - Preзo $80.000\nSweeper - Preзo $7.000\nTahoma - Preзo $48.000\nTornado - Preзo $33.000\nTractor - Preзo $5.000\nTug - Preзo $3.000\n<- Voltar";
ShowPlayerDialog(playerid, VeiculosLista8, DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 8",Lista8,"Comprar","Cancelar");
}
if(listitem == 8)
{
new Lista9 []= "Turismo - Preзo $95.000\nUranus - Preзo $57.000\nVincent - Preзo $42.000\nVirgo - Preзo $22.000\nVoodoo - Preзo $23.000\nVortex - Preзo $10.000\nWalton - Preзo $10.000\nWashington - Preзo $29.000\nWayfarer - Preзo $11.000\nWillard - Preзo $37.000\nWindsor - Preзo $19.000\nYosemite - Preзo $77.000\nZR-350 - Preзo $85.000\n<- Voltar";
ShowPlayerDialog(playerid, VeiculosLista9, DIALOG_STYLE_LIST,"~> Veнculos Casas Lista 9",Lista9,"Comprar","Cancelar");
}
}
}
else if(dialogid == VeiculosLista1)
{
if(response)
{
if(listitem == 0)
{
OnPlayerCommandText(playerid, "/veiculodacasa Admiral");
}
if(listitem == 1)
{
OnPlayerCommandText(playerid, "/veiculodacasa Alpha");
}
if(listitem == 2)
{
OnPlayerCommandText(playerid, "/veiculodacasa Banshee");
}
if(listitem == 3)
{
OnPlayerCommandText(playerid, "/veiculodacasa Bandito");
}
if(listitem == 4)
{
OnPlayerCommandText(playerid, "/veiculodacasa BF-400");
}
if(listitem == 5)
{
OnPlayerCommandText(playerid, "/veiculodacasa BF-Injection");
}
if(listitem == 6)
{
OnPlayerCommandText(playerid, "/veiculodacasa Bike");
}
if(listitem == 7)
{
OnPlayerCommandText(playerid, "/veiculodacasa Blade");
}
if(listitem == 8)
{
OnPlayerCommandText(playerid, "/veiculodacasa Blista Compact");
}
if(listitem == 9)
{
OnPlayerCommandText(playerid, "/veiculodacasa Bloodring Banger");
}
if(listitem == 10)
{
OnPlayerCommandText(playerid, "/veiculodacasa Bmx");
}
if(listitem == 11)
{
OnPlayerCommandText(playerid, "/veiculodacasa Bobcat");
}
if(listitem == 12)
{
new Listas []= "Veнculos - Lista 1\nVeнculos - Lista 2\nVeнculos - Lista 3\nVeнculos - Lista 4\nVeнculos - Lista 5\nVeнculos - Lista 6\nVeнculos - Lista 7\nVeнculos - Lista 8\nVeнculos - Lista 9";
ShowPlayerDialog(playerid, VeiculosCasas, DIALOG_STYLE_LIST,"Escola uma Lista de Veiculos para Comprar",Listas,"OK","Sair");
}
}
}
PHP код:
CMD:veiculodacasa(playerid,params[])
{
format(Global, sizeof(Global), "Casas/Casaid%d.ini", playericonhouse[playerid]);
new timestamp = GetTickCount();
if(timestamp - inhousepickup[playerid] > 4000)
{
SendClientMessage( playerid, BRANCO, "[ x ] Vocк nгo estб em uma casa !" );
return 1;
}
new pname[24];
GetPlayerName(playerid, pname, 24);
if(cInfo[playericonhouse[playerid]][GotCar] == 0)
{
SendClientMessage(playerid,BRANCO, "[ x ] Essa casa nгo pode ter veнculo!");
return 1;
}
if(DOF2_GetInt(Global, "TemCarro") == 1)
{
SendClientMessage(playerid,BRANCO, "[ x ] Vocк jб possui um veнculo use /venderveiculo!");
return 1;
}
if(strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0)
{
new carname[40];
if(sscanf(params, "s[50]", carname))
{
SendClientMessage(playerid, BARRA_AVISO, "[ x ] Uso correto: /VeiculodaCasa [nome do veнculo]");
}
else
{
new abc;
for(new i=0;i<MAX_BUY_CARS;i++)
{
if(strcmp(carname, Buyable_Cars[i][CarName], true) == 0)
{
if(GetPlayerMoney(playerid) < Buyable_Cars[i][CarCost])
{
SendClientMessage(playerid,BRANCO, "[ x ] Vocк nгo tem dinheiro o suficiente para comprar esse veнculo!");
return 1;
}
GivePlayerMoney(playerid, - Buyable_Cars[i][CarCost]);
DOF2_SetInt(Global, "TemCarro", 1);
hInfo[playericonhouse[playerid]][TemCarro] = 1;
cInfo[playericonhouse[playerid]][CarModel] = Buyable_Cars[i][CarModel];
DOF2_SetInt(Global, "CarModel", Buyable_Cars[i][CarModel]);
DOF2_SetInt(Global, "PVENDA", Buyable_Cars[i][CarCost]);
format(Global, sizeof(Global), "[ > ] Vocк comprou o veнculo %s para sua casa.", carname);
SendClientMessage(playerid, BRANCO, Global);
cInfo[playericonhouse[playerid]][NewCar] = 1;
DOF2_SaveFile();
abc = 1;
}
}
if(abc == 0)
{
SendClientMessage(playerid,BRANCO, "[ x ] Nгo temos esse veнculo em nossa lista!");
abc = 0;
}
}
}
else
{
SendClientMessage(playerid,BRANCO, "[ x ] Vocк nгo й dono dessa casa!");
}
return 1;
}