17/05/2022 20:09
(Esta mensagem foi modificada pela última vez a: 17/05/2022 20:11 por xbruno1000x.)
O carro some quando o outro jogador cria oq ta errado ajuda pfv
Código:
#include <a_samp>
#include <zcmd>
#include <sscanf>
new Carro[MAX_PLAYERS];
new pveh[90];
new NomeDosVeiculos[212][] =
{
"Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
"Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
"Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
"Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
"Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
"Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
"Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
"Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B",
"Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain",
"Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
"Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
"Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
"Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
"Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",
"Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)",
"Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",
"Stair Trailer","Boxville","Farm Plow","Utility Trailer"
};
public OnFilterScriptInit()
{
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
CMD:car(playerid, params[])
{
{
new String[200], Cor1, Cor2, Float:PosX,Float:PosY,Float:PosZ;
if(sscanf(params, "s[90]dd", pveh, Cor1, Cor2)) return SendClientMessage(playerid, 0xFF0000AA, "| ERRO | Tente Usar /car [Nome] [Cor 1] [Cor 2]");
new vehicle = PegarNomeDoVeiculo(pveh);
{
if(vehicle == 539 ||vehicle == 444 ||vehicle == 557 ||vehicle == 556 ||vehicle == 537 ||vehicle == 569 ||vehicle == 590 ||vehicle == 538 ||vehicle == 570 ||vehicle == 591 ||vehicle == 450 ||vehicle == 435 ||vehicle == 608 ||vehicle == 611 ||vehicle == 584 ||vehicle == 610 ||vehicle == 606 ||vehicle == 607) return SendClientMessage(playerid, 0xFF0000FF, "Carro Proibido");
else
if(vehicle == 476 ||vehicle == 594 ||vehicle == 465 ||vehicle == 501 ||vehicle == 469 ||vehicle == 447 ||vehicle == 497 ||vehicle == 563 ||vehicle == 488 ||vehicle == 487 ||vehicle == 417 ||vehicle == 548 ||vehicle == 513 ||vehicle == 460 ||vehicle == 553 ||vehicle == 593 ||vehicle == 512 ||vehicle == 511 ||vehicle == 577) return SendClientMessage(playerid, 0xFF0000FF, "Carro Proibido");
else
if(vehicle == 564 ||vehicle == 441 ||vehicle == 519 ||vehicle == 431 ||vehicle == 443 ||vehicle == 524 ||vehicle == 406 ||vehicle == 520 || vehicle == 432 || vehicle == 592 || vehicle == 425 || vehicle == 464 || vehicle == 577 || vehicle == 592 || vehicle == 447 || vehicle == 464) return SendClientMessage(playerid, 0xFF0000FF, "Carro Proibido");
else
if(vehicle == 430 ||vehicle == 446 ||vehicle == 452 ||vehicle == 453 ||vehicle == 454 ||vehicle == 472 ||vehicle == 473 ||vehicle == 484 || vehicle == 493 || vehicle == 595 || vehicle == 539) return SendClientMessage(playerid, 0xFF0000FF, "Carro Proibido");
}
GetPlayerPos(playerid, PosX, PosY, PosZ);
DestroyVehicle(Carro[playerid]);
Carro[playerid] = CreateVehicle(vehicle, PosX, PosY, PosZ, 180, Cor1, Cor2, 0);
SetVehicleVirtualWorld(Carro[ playerid ], GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, Carro[playerid], 0);
format(String, sizeof(String), "|BDF|{FFFFFF} Veiculo Criado Com Sucesso! [ Veiculo:{00FFFF}%s ]", NomeDosVeiculos[vehicle - 400]);
SendClientMessage(playerid, 0x00FFFFFF, String);
}
return 1;
}
stock PegarNomeDoVeiculo(vehnome[])
{
for(new i = 0; i < 211; i++)
{
if(strfind(NomeDosVeiculos[i], vehnome, true) != -1)
return i + 400;
}
return -1;
}