/Car elegy [cor1] [cor2]
Quer um cafйzinho com biscoitos tambйm? '-' |
CMD:car(playerid, params[])
{
new value[5], string[24 char];
if(unformat(params, "s[24]iI(-1)",string,value[0],value[1]))
return SendClientMessage(playerid, -1, "Uso: /car [veiculo] [cor 1] [cor 2]!");
value[3] = -1;
for(new i=0; i<sizeof(VehicleNames); i++)
{
if(strfind(VehicleNames[i], string, true) != -1)
{
value[3] = i+400;
break;
}
}
if(value[3] == -1) return SendClientMessage(playerid, COLOR_RED, "[Erro]{b4b5b7} Nome invбlido!");
GetPlayerPos(playerid, pX,pY,pZ);
GetPlayerFacingAngle(playerid, pA);
if(value[1] == -1) value[1] = value[0];
value[2] = CreateVehicle(value[3],pX,pY,pZ,pA,value[0],value[1],999999);
LinkVehicleToInterior(value[2], GetPlayerInterior(playerid));
SetVehicleVirtualWorld(value[2], GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, value[2], 0);
SendClientMessage(playerid, -1, "Veiculo criado com sucesso!");
return 1;
}
new VehicleNames[212][] =
{
"Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster",
"Stretch","Manana","Infernus","Voodoo","Pony","Mule","Cheetah","Ambulancia","Leviathan","Moonbeam","Esperanto",
"Taxi","Washington","Bobcat","MrWhoopee","BFInjection","Hunter","Premier","Enforcer","Securicar","Banshee",
"Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie","Stallion","Rumpo",
"RCBandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer",
"Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley'sRCVan","Skimmer",
"PCJ-600","Faggio","Freeway","RCBaron","RCRaider","Glendale","Oceanic","Sanchez","Sparrow","Patriot",
"Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR-350","Walton","Regina","Comet","BMX",
"Burrito","Camper","Marquis","Baggage","Dozer","Maverick","NewsChopper","Rancher","FBIRancher","Virgo",
"Greenwood","Jetmax","Hotring","Sandking","BlistaCompact","MaverickPolicial","Boxville","Benson","Mesa",
"RCGoblin","HotringRacerA","HotringRacerB","BloodringBanger","Rancher","SuperGT","Elegant",
"Journey","Bike","MountainBike","Beagle","Cropdust","Stunt","Tanker","RoadTrain","Nebula","Majestic",
"Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","CementTruck","TowTruck","Fortune","Cadrona",
"FBITruck","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","MonsterA","MonsterB","Uranus",
"Jester","Sultan","Stratum","Elegy","Raindance","RCTiger","Flash","Tahoma","Savanna","Bandito","Freight",
"Trailer","Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford",
"BF-400","Newsvan","Tug","TrailerA","Emperor","Wayfarer","Euros","Hotdog","Club","TrailerB","TrailerC",
"Andromada","Dodo","RCCam","Launch","Viatura(LSPD)","Viatura(SFPD)","Viatura(LVPD)","PoliceRanger",
"Picador","S.W.A.T.Van","Alpha","Phoenix","Glendale","Sadler","LuggageTrailerA","LuggageTrailerB",
"StairTrailer","Boxville","FarmPlow","UtilityTrailer"
};
if(!strcmp(cmd, "/car"))
{
new value[5], string[24 char];
if(unformat(params, "s[24]iI(-1)",string,value[0],value[1]))
return SendClientMessage(playerid, -1, "Uso: /car [veiculo] [cor 1] [cor 2]!");
value[3] = -1;
for(new i=0; i<sizeof(VehicleNames); i++)
{
if(strfind(VehicleNames[i], string, true) != -1)
{
value[3] = i+400;
break;
}
}
if(value[3] == -1) return SendClientMessage(playerid, COLOR_RED, "[Erro]{b4b5b7} Nome invбlido!");
GetPlayerPos(playerid, pX,pY,pZ);
GetPlayerFacingAngle(playerid, pA);
if(value[1] == -1) value[1] = value[0];
value[2] = CreateVehicle(value[3],pX,pY,pZ,pA,value[0],value[1],999999);
LinkVehicleToInterior(value[2], GetPlayerInterior(playerid));
SetVehicleVirtualWorld(value[2], GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, value[2], 0);
SendClientMessage(playerid, -1, "Veiculo criado com sucesso!");
return 1;
}