Bem como ele e muitos usam o Game Mode BML ele tem um bug nos carros das casas que quando compra eles fica vindo por cima do outro aqui vai a solução então =D
O problema ta na linha:
do codigo /comprarcarros
Faça o seguinte.
adicione uma constante à enum hInfo com o seguinte nome
Em seguida ache esta linha na public OnGameModeInit
E troque-a por:
E por ultimo substitua os comandos /comprarcarro e /trancar por estes:
O problema ta na linha:
- Spoiler:
- new carid = PlayerInfo[playerid][pPHousekey]+totalveiculosh;
do codigo /comprarcarros
Faça o seguinte.
adicione uma constante à enum hInfo com o seguinte nome
- Spoiler:
- hV_ID
Em seguida ache esta linha na public OnGameModeInit
- Spoiler:
- AddStaticVehicleEx(HouseInfo[h][hVec], HouseCarSpawns[h][0], HouseCarSpawns[h][1], HouseCarSpawns[h][2], HouseCarSpawns[h][3], HouseInfo[h][hVcol1], HouseInfo[h][hVcol2], 6000000);
E troque-a por:
- Spoiler:
- HouseInfo[h][hV_ID] = AddStaticVehicleEx(HouseInfo[h][hVec], HouseCarSpawns[h][0], HouseCarSpawns[h][1], HouseCarSpawns[h][2], HouseCarSpawns[h][3], HouseInfo[h][hVcol1], HouseInfo[h][hVcol2], 6000000);
E por ultimo substitua os comandos /comprarcarro e /trancar por estes:
- Spoiler:
- if (strcmp(cmd, "/comprarcarro", true) == 0 || strcmp(cmd, "/trocarcarro", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new House = PlayerInfo[playerid][pPHousekey];
GetPlayerName(playerid, playername, sizeof(playername));
if (House != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0)
{
new gunid[16];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}|___ {00FA2E}P {FAF600}S {003EFA}G {FFFFFF}____[ {F28FEC}Novos Carros Preço € 100000 {FFFFFF}]____ {00FA2E}P {FAF600}S {003EFA}G {FFFFFF}___|");
SendClientMessage(playerid, 0xFFD700FF,"Use: /comprarcarro [Nome Do Carro].");
SendClientMessage(playerid, 0x98F5FFFF, "Carros: | blistac | clover | elegant | emperor | glendale | greenwood | stafford | mountainbike |");
SendClientMessage(playerid, 0x98F5FFFF, "Carros: | huntley | jester | landstalker | merit | nebula | sabre | stratum | hornet | bike |");
SendClientMessage(playerid, 0x98F5FFFF, "Carros: | sunrise | tahoma | uranus | blade | flash | buffalo | phoenix | sultan | bf-injection |");
SendClientMessage(playerid, 0x98F5FFFF, "Carros VIP's: | limozine | elegy | hotknife | bandito | nrg500 | zr350 | premier |");
SendClientMessage(playerid, 0x98F5FFFF, "Carros VIP's: | bullet | turismo | infernus | cheetah | savanna | comet |");
return 1;
}
strmid(gunid, tmp, 0, strlen(cmdtext), 255);
if (GetPlayerMoney(playerid) > 100000)
{
if(strcmp(gunid, "limozine", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para Limozine.");
HouseInfo[House][hVec] = 409;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
if(strcmp(gunid, "premier", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para Premier.");
HouseInfo[House][hVec] = 426;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "hotknife", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para Hotknife.");
HouseInfo[House][hVec] = 434;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "comet", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para Comet.");
HouseInfo[House][hVec] = 480;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "zr350", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o ZR-350.");
HouseInfo[House][hVec] = 477;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "nrg500", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para a moto nrg500.");
HouseInfo[House][hVec] = 522;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "bandito", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Bandito.");
HouseInfo[House][hVec] = 568;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "elegy", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Elegy.");
HouseInfo[House][hVec] = 562;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "bullet", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Bullet.");
HouseInfo[House][hVec] = 541;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "turismo", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Turismo.");
HouseInfo[House][hVec] = 451;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "infernus", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Infernus.");
HouseInfo[House][hVec] = 411;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "cheetah", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Cheetah.");
HouseInfo[House][hVec] = 415;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "savanna", true, strlen(gunid)) == 0)
{
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não é Player VIP !");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Savanna.");
HouseInfo[House][hVec] = 567;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "blistac", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Blista Compact.");
HouseInfo[House][hVec] = 496;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "stafford", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Stafford.");
HouseInfo[House][hVec] = 580;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "clover", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Clover.");
HouseInfo[House][hVec] = 542;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "sultan", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Sultan.");
HouseInfo[House][hVec] = 560;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "elegant", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Elegant.");
HouseInfo[House][hVec] = 507;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "hornet", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Hornet.");
HouseInfo[House][hVec] = 521;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "phoenix", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Phoenix.");
HouseInfo[House][hVec] = 603;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "emperor", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Emperor.");
HouseInfo[House][hVec] = 585;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "glendale", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Glendale.");
HouseInfo[House][hVec] = 466;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "greenwood", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Greenwood.");
HouseInfo[House][hVec] = 492;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "huntley", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Huntley.");
HouseInfo[House][hVec] = 579;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "jester", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Jester.");
HouseInfo[House][hVec] = 559;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "landstalker", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Landstalker.");
HouseInfo[House][hVec] = 400;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "merit", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Merit.");
HouseInfo[House][hVec] = 551;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "nebula", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Nebula.");
HouseInfo[House][hVec] = 516;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "sabre", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Sabre.");
HouseInfo[House][hVec] = 475;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "stratum", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Stratum.");
HouseInfo[House][hVec] = 561;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "sunrise", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Sunrise.");
HouseInfo[House][hVec] = 550;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "tahoma", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Tahoma.");
HouseInfo[House][hVec] = 566;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "uranus", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Uranus.");
HouseInfo[House][hVec] = 558;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "blade", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Blade.");
HouseInfo[House][hVec] = 536;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "flash", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Flash.");
HouseInfo[House][hVec] = 565;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "buffalo", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o Buffalo.");
HouseInfo[House][hVec] = 402;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "bf-injection", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para o BF Injection.");
HouseInfo[House][hVec] = 424;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "bike", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para uma Bike.");
HouseInfo[House][hVec] = 509;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else if(strcmp(gunid, "montainbike", true, strlen(gunid)) == 0)
{
SendClientMessage(playerid, 0x98F5FFFF, "Atualização: Você trocou o carro da sua casa para uma Montain Bike.");
HouseInfo[House][hVec] = 510;
DestroyVehicle(HouseInfo[House][hV_ID]);
HouseInfo[House][hV_ID] = CreateVehicle(HouseInfo[House][hVec], HouseCarSpawns[House][0], HouseCarSpawns[House][1], HouseCarSpawns[House][2], HouseCarSpawns[House][3], HouseInfo[House][hVcol1], HouseInfo[House][hVcol2], 6000000);
}
else
{
SendClientMessage(playerid, 0xFFD700FF,"Use: /comprarcarro [Nome Do Carro].");
SendClientMessage(playerid, 0x98F5FFFF, "Carros: | blistac | clover | elegant | emperor | glendale | greenwood | stafford | mountainbike |");
SendClientMessage(playerid, 0x98F5FFFF, "Carros: | huntley | jester | landstalker | merit | nebula | sabre | stratum | hornet | bike |");
SendClientMessage(playerid, 0x98F5FFFF, "Carros: | sunrise | tahoma | uranus | blade | flash | buffalo | phoenix | sultan | bf-injection |");
SendClientMessage(playerid, 0x98F5FFFF, "Carros VIP's: | limozine | elegy | hotknife | bandito | nrg500 | zr350 | premier |");
SendClientMessage(playerid, 0x98F5FFFF, "Carros VIP's: | bullet | turismo | infernus | cheetah | savanna | comet |");
return 1;
}
SendClientMessage(playerid, 0x98F5FFFF, "Você Pagou € 100000, Seu Carro Já Tá Em Sua Casa.");
OnPropUpdate();
GivePlayerMoney(playerid,-100000);
SBizzInfo[5][sbTill] += 100000;
ExtortionSBiz(5, 100000);
PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não Tem (€100000) !");
return 1;
}
}
else
{
SendClientMessage(playerid, 0x98F5FFFF, "Você Não Tem Uma Casa.");
return 1;
}
}
return 1;
}
//===================================================================================================================//
if(strcmp(cmd, "/trancar", true) == 0)
{
new carid;
if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
{
if(gLastCar[playerid] == 0 && PlayerInfo[playerid][pPHousekey] == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Você não tem um carro de casa/alugado.");
return 1;
}
else if(gLastCar[playerid] != 0)
{
if (HireCar[playerid] != gLastCar[playerid] && HireCar[playerid] > 0)
{
gLastDriver[HireCar[playerid]] = 300;
VTrancado[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
}
HireCar[playerid] = gLastCar[playerid];
}
}
if (PlayerInfo[playerid][pPHousekey] == 255)
{
if(HireCar[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Voce não tem um carro.");
return 1;
}
}
if(PlayerInfo[playerid][pPHousekey] != 255) carid = HouseInfo[PlayerInfo[playerid][pPHousekey]][hV_ID];
if(HireCar[playerid] > 0 && !SwitchKey[playerid])
{
carid = HireCar[playerid];
}
new lockstatus = VTrancado[carid];
new Float:cx,Float:cy,Float:cz;
GetVehiclePos(carid, cx, cy, cz);
switch (lockstatus)
{
case 0:
{
if(HireCar[playerid] == 0 && PlayerInfo[playerid][pPHousekey] == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Voce não tem um carro");
return 1;
}
if(HireCar[playerid] == carid && !SwitchKey[playerid])
{
GameTextForPlayer(playerid, "~w~Veiculo Alugado~r~Fechado", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
VTrancado[carid] = 1;
LockCar(carid);
return 1;
}
else if(HouseInfo[PlayerInfo[playerid][pPHousekey]][hV_ID] == carid)
{
GameTextForPlayer(playerid, "~w~Veiculo da Casa ~r~Fechado", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
VTrancado[carid] = 1;
LockCar(carid);
return 1;
}
}
case 1:
{
if(HireCar[playerid] == 0 && PlayerInfo[playerid][pPHousekey] == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Voce não tem um carro");
return 1;
}
if(HireCar[playerid] == carid && !SwitchKey[playerid])
{
GameTextForPlayer(playerid, "~w~Veiculo Alugado~g~Aberto", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
VTrancado[carid] = 0;
UnLockCar(carid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
return 1;
}
if (HouseInfo[PlayerInfo[playerid][pPHousekey]][hV_ID] == carid)
{
GameTextForPlayer(playerid, "~w~Veiculo da Casa ~g~Aberto", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
VTrancado[carid] = 0;
UnLockCar(carid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
default:
{
SendClientMessage(playerid, COLOR_GRAD2, "Erro");
}
}
if(carid == 256)
{
SendClientMessage(playerid, COLOR_GRAD2, "Voce não tem um carro!");
}
return 1;
}