if(strcmp(cmd,"/veiculo",true)==0 || strcmp(cmd,"/vh",true)==0)
{
new vehid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid,playername,sizeof(playername));
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE," USE: /veiculo ajuda para ver os comandos de seu veнculo VIP");
return 1;
}
if(strcmp(tmp, "ajuda", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pCarKey] != 0 || PlayerInfo[playerid][pCarKey2] != 0)
{
SendClientMessage(playerid, COLOR_GRAD2,"** /veiculo comprar - para comprar o Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** /veiculo vender - para vender o Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** /veiculo ajuda - para ver os comandos dos Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** /veiculo trancar - para trancar ou abrir o Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** /veiculo cor - para mudar a cor do Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** /veiculo estacionar - para estacionar o Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** /veiculo modelo - para mudar o modelo do Veiculo");
SendClientMessage(playerid, COLOR_GRAD2,"** /retirargrana - para retirar a grana do seu carro");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"** Vocк precisa estar no seu carro VIP para usar esses comandos.");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_GRAD2," Vocк nгo tem um Veiculo VIP! ");
return 1;
}
}
return 1;
}
if(strcmp(tmp, "comprar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pVIP] == 0 && PlayerInfo[playerid][pSocio] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um jogador VIP/Socio");
RemovePlayerFromVehicleEx(playerid);
return 1;
}
else
{
for(new i = 0; i < sizeof(CarInfo); i++)
{
if(CarInfo[i][ownedvehicle] == vehid)
{
if(PlayerInfo[playerid][pCarKey] != 0 && PlayerInfo[playerid][pVIP] >= 1 && PlayerInfo[playerid][pSocio] >= 1)
{
SendClientMessage(playerid, COLOR_GREY, " Sу pode ter 1 carro vip !");
RemovePlayerFromVehicleEx(playerid);
return 1;
}
if(PlayerInfo[playerid][pCarKey2] != 0 && PlayerInfo[playerid][pSocio] >= 1)
{
SendClientMessage(playerid, COLOR_GREY, " Sу pode ter 2 carros vip's !");
RemovePlayerFromVehicleEx(playerid);
return 1;
}
if(CarInfo[i][cOwned]==1)
{
SendClientMessage(playerid, COLOR_GREY, "Este carro VIP/Socio jб tem dono");
RemovePlayerFromVehicleEx(playerid);
return 1;
}
if(PlayerInfo[playerid][pCarKey] == 0)
{
if(GetPlayerMoney(playerid) >= CarInfo[i][cValue])
{
PlayerInfo[playerid][pCarKey] = i+totalveiculosc;
PlayerInfo[playerid][pVeiculo] = i;
CarInfo[i][cOwned] = 1;
CarOffered[playerid]=0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[i][cOwner], sendername, 0, strlen(sendername), 999);
GivePlayerMoney(playerid,-CarInfo[i][cValue]);
GameTextForPlayer(playerid, "~w~Parabens~n~Voce comprou esse Carro VIP!", 5000, 3);
PlayerPlaySound(playerid, 1147, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD2, "parabens pela sua compra !");
SendClientMessage(playerid, COLOR_GRAD2, "USE: /veiculo ajuda para ver os comandos");
TogglePlayerControllable(playerid, 1);
SaveCars();
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem dinheiro para isso!");
RemovePlayerFromVehicleEx(playerid);
}
return 1;
}
if(PlayerInfo[playerid][pCarKey2] == 0)
{
if(PlayerInfo[playerid][pSocio] < 1)
{
SendClientMessage(playerid, COLOR_GREY, "Apenas Sуcios podem ter dois carros vips.");
RemovePlayerFromVehicleEx(playerid);
return 1;
}
if(GetPlayerMoney(playerid) >= CarInfo[i][cValue])
{
PlayerInfo[playerid][pCarKey2] = i+totalveiculosc;
PlayerInfo[playerid][pVeiculo2] = i;
CarInfo[i][cOwned] = 1;
CarOffered[playerid]=0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[i][cOwner], sendername, 0, strlen(sendername), 999);
GivePlayerMoney(playerid,-CarInfo[i][cValue]);
GameTextForPlayer(playerid, "~w~Parabens~n~Voce comprou esse Carro Socio!", 5000, 3);
PlayerPlaySound(playerid, 1147, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD2, "parabens pela sua compra !");
SendClientMessage(playerid, COLOR_GRAD2, "USE: /veiculo ajuda para ver os comandos");
TogglePlayerControllable(playerid, 1);
SaveCars();
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem dinheiro para isso!");
RemovePlayerFromVehicleEx(playerid);
}
return 1;
}
}
}
}
}
return 1;
}
if(strcmp(tmp, "vender", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
{
SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo]][cOwner], true) == 0)
{
new rand;
new car = PlayerInfo[playerid][pVeiculo];
CarInfo[car][cOwned] = 0;
CarInfo[car][cModel] = 560;
CarInfo[car][cColorOne] = 0;
CarInfo[car][cColorTwo] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
GivePlayerMoney(playerid,CarInfo[car][cValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicleEx(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pCarKey] = 0;
PlayerInfo[playerid][pVeiculo] = 0;
rand = random(sizeof(gRandomCarsSpawns));
CarInfo[car][cLocationx] = gRandomCarsSpawns[rand][0];
CarInfo[car][cLocationy] = gRandomCarsSpawns[rand][1];
CarInfo[car][cLocationz] = gRandomCarsSpawns[rand][2];
CarInfo[car][cAngle] = gRandomCarsSpawns[rand][3];
SaveCars();
return 1;
}
else if(PlayerInfo[playerid][pCarKey2] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo2]][cOwner], true) == 0)
{
new rand;
new car = PlayerInfo[playerid][pVeiculo2];
CarInfo[car][cOwned] = 0;
CarInfo[car][cModel] = 560;
CarInfo[car][cColorOne] = 0;
CarInfo[car][cColorTwo] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
GivePlayerMoney(playerid,CarInfo[car][cValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicleEx(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pCarKey2] = 0;
PlayerInfo[playerid][pVeiculo2] = 0;
rand = random(sizeof(gRandomCarsSpawns));
CarInfo[car][cLocationx] = gRandomCarsSpawns[rand][0];
CarInfo[car][cLocationy] = gRandomCarsSpawns[rand][1];
CarInfo[car][cLocationz] = gRandomCarsSpawns[rand][2];
CarInfo[car][cAngle] = gRandomCarsSpawns[rand][3];
SaveCars();
return 1;
}
}
return 1;
}
if(strcmp(tmp, "trancar", true) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
{
SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
return 1;
}
new keycar;
if(vehid == PlayerInfo[playerid][pCarKey]) { keycar = PlayerInfo[playerid][pVeiculo]; }
else if(vehid == PlayerInfo[playerid][pCarKey2]) { keycar = PlayerInfo[playerid][pVeiculo2]; }
if(IsPlayerConnected(playerid))
{
if(CarInfo[keycar][cLock] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) SetVehicleParamsForPlayer(CarInfo[keycar][ownedvehicle],i,0,0);
}
format(string, sizeof(string), "~w~Veiculo VIP~n~~g~Aberto");
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, string, 10000, 3);
CarInfo[keycar][cLock] = 0;
return 1;
}
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) SetVehicleParamsForPlayer(CarInfo[keycar][ownedvehicle],i,0,1);
}
format(string, sizeof(string), "~w~Veiculo VIP~n~~r~Trancado");
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, string, 10000, 3);
CarInfo[keycar][cLock] = 1;
return 1;
}
}
return 1;
}
if(strcmp(tmp, "estacionar", true) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
{
SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
return 1;
}
new Float:x,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
new Veiculo;
if(vehid == PlayerInfo[playerid][pCarKey]) { carid = PlayerInfo[playerid][pCarKey]; Veiculo = PlayerInfo[playerid][pVeiculo]; }
else if(vehid == PlayerInfo[playerid][pCarKey2]) { carid = PlayerInfo[playerid][pCarKey2]; Veiculo = PlayerInfo[playerid][pVeiculo2]; }
if(IsPlayerInVehicle(playerid,carid) && CarInfo[Veiculo][cOwned] == 1)
{
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
GetVehicleZAngle(carid, a);
if(getcarid == carid)
{
CarInfo[Veiculo][cLocationx] = x;
CarInfo[Veiculo][cLocationy] = y;
CarInfo[Veiculo][cLocationz] = z;
CarInfo[Veiculo][cAngle] = a;
format(string, sizeof(string), "~n~ Veiculo Estacionado Aqui! ~n~");
GameTextForPlayer(playerid, "Veiculo Estacionado!~n~Ele vai nascer aqui!.", 10000, 3);
DestroyVehicle(carid);
new carid2 = CreateVehicle(CarInfo[Veiculo][cModel],CarInfo[Veiculo][cLocationx],CarInfo[Veiculo][cLocationy],CarInfo[Veiculo][cLocationz]+1.0,CarInfo[Veiculo][cAngle],CarInfo[Veiculo][cColorOne],CarInfo[Veiculo][cColorTwo],60000);
TogglePlayerControllable(playerid, 1);
SaveCars();
SetVehicleToRespawn(carid2);
return 1;
}
return 1;
}
return 1;
}
if(strcmp(tmp, "modelo", true) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
{
SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
return 1;
}
new modelo;
new carid;
new Veiculo;
if(vehid == PlayerInfo[playerid][pCarKey]) { carid = PlayerInfo[playerid][pCarKey]; Veiculo = PlayerInfo[playerid][pVeiculo]; }
else if(vehid == PlayerInfo[playerid][pCarKey2]) { carid = PlayerInfo[playerid][pCarKey2]; Veiculo = PlayerInfo[playerid][pVeiculo2]; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /veiculo modelo [modelo]");
return 1;
}
modelo = strval(tmp);
if(modelo < 400 || modelo > 611) { SendClientMessage(playerid, COLOR_GREY, " Nossos Modelos Estгo Entre 400 e 611!"); return 1; }
if(modelo == 592 || modelo == 577 || modelo == 553 || modelo == 520 || modelo == 525 || modelo == 547 || modelo == 435
|| modelo == 441 || modelo == 449 || modelo == 450 || modelo == 460 || modelo == 464 || modelo == 465 || modelo == 501
|| modelo == 537 || modelo == 538 || modelo == 564 || modelo == 569 || modelo == 570 || modelo == 584 || modelo == 590
|| modelo == 591 || modelo == 594 || modelo == 606 || modelo == 607 || modelo == 608 || modelo == 610 || modelo == 611
|| modelo == 596 || modelo == 599 || modelo == 597 || modelo == 598 || modelo == 427 || modelo == 528 || modelo == 544
|| modelo == 407 || modelo == 455 || modelo == 502 || modelo == 503 || modelo == 494 || modelo == 582 || modelo == 470
|| modelo == 495 || modelo == 601 || modelo == 548 || modelo == 417 || modelo == 497 || modelo == 563 || modelo == 447
|| modelo == 469 || modelo == 488 || modelo == 557 || modelo == 556 || modelo == 444 || modelo == 573 || modelo == 406
|| modelo == 590 || modelo == 569 || modelo == 537 || modelo == 538 || modelo == 570 || modelo == 449 || modelo == 472
|| modelo == 473 || modelo == 493 || modelo == 595 || modelo == 484 || modelo == 430 || modelo == 453 || modelo == 452
|| modelo == 446 || modelo == 454 || modelo == 432 || modelo == 425 || modelo == 571 || modelo == 490 || modelo == 523
|| modelo == 408 || modelo == 414 || modelo == 416 || modelo == 420 || modelo == 423 || modelo == 428
|| modelo == 431 || modelo == 433 || modelo == 437 || modelo == 438 || modelo == 443 || modelo == 456 || modelo == 476
|| modelo == 486 || modelo == 490 || modelo == 498 || modelo == 499 || modelo == 511 || modelo == 512 || modelo == 513
|| modelo == 514 || modelo == 515 || modelo == 519 || modelo == 523 || modelo == 524 || modelo == 530 || modelo == 531
|| modelo == 532 || modelo == 539 || modelo == 568 || modelo == 572 || modelo == 574 || modelo == 578 || modelo == 483
|| modelo == 583 || modelo == 588 || modelo == 593 || modelo == 609)
{
SendClientMessage(playerid, COLOR_GRAD2, "Este Modelo й Proibido!");
return 1;
}
if(IsPlayerInVehicle(playerid,carid) && CarInfo[Veiculo][cOwned] == 1)
{
CarInfo[Veiculo][cModel] = modelo;
GameTextForPlayer(playerid, "Modelo do seu Carro VIP Mudado! -R$1000.", 10000, 3);
DestroyVehicle(carid);
CreateVehicle(CarInfo[Veiculo][cModel],CarInfo[Veiculo][cLocationx],CarInfo[Veiculo][cLocationy],CarInfo[Veiculo][cLocationz]+1.0,CarInfo[Veiculo][cAngle],CarInfo[Veiculo][cColorOne],CarInfo[Veiculo][cColorTwo],60000);
TogglePlayerControllable(playerid, 1);
GivePlayerMoney(playerid,-1000);
SBizzInfo[8][sbTill] += 1000;
ExtortionSBiz(8, 1000);
SaveCars();
return 1;
}
return 1;
}
if(strcmp(tmp, "cor", true) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
{
SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "USE: /veiculo cor [cor 1] [cor 2]");
SendClientMessage(playerid, COLOR_YELLOW, "Cores = Entre 0 e 126!.");
return 1;
}
new carid;
new Veiculo;
if(vehid == PlayerInfo[playerid][pCarKey]) { carid = PlayerInfo[playerid][pCarKey]; Veiculo = PlayerInfo[playerid][pVeiculo]; }
else if(vehid == PlayerInfo[playerid][pCarKey2]) { carid = PlayerInfo[playerid][pCarKey2]; Veiculo = PlayerInfo[playerid][pVeiculo2]; }
new cor1;
cor1 = strval(tmp);
if(cor1 < 0 || cor1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Cores entre 0 e 126!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "USE: /veiculo cor [cor 1] [cor 2]");
SendClientMessage(playerid, COLOR_YELLOW, "Cores = Entre 0 e 126!.");
return 1;
}
new cor2;
cor2 = strval(tmp);
if(cor2 < 0 || cor2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Cores entre 0 e 126!"); return 1; }
if(IsPlayerInVehicle(playerid,carid) && CarInfo[Veiculo][cOwned] == 1)
{
CarInfo[Veiculo][cColorOne] = cor1;
CarInfo[Veiculo][cColorTwo] = cor2;
GameTextForPlayer(playerid, "Cor do seu Carro VIP Mudada! -R$1000.", 10000, 3);
ChangeVehicleColor(carid,cor1,cor2);
TogglePlayerControllable(playerid, 1);
GivePlayerMoney(playerid,-1000);
SBizzInfo[8][sbTill] += 1000;
ExtortionSBiz(8, 1000);
SaveCars();
return 1;
}
return 1;
}
return 0;
}
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
if(PlayerInfo[playerid][pCarKey] != 0 && PlayerInfo[playerid][pCarKey2] != 0)
tente trocar
Код:
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid) Код:
if(PlayerInfo[playerid][pCarKey] != 0 && PlayerInfo[playerid][pCarKey2] != 0) |