Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- new VehicleCmdNames[212][32] =
- {
- "/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", "/ZR 350", "/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", "/Hotring Racer", "/Bloodring Banger",
- "/Rancher", "/Super GT", "/Elegant", "/Journey", "/Bike",
- "/Mountain Bike", "/Beagle", "/Cropdust", "/Stunt", "/Tanker",
- "/RoadTrain", "/Nebula", "/Majestic", "/Buccaneer", "/Shamal",
- "/Hydra", "/FCR", "/NRG", "/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", "/Monstera", "/Monsterb", "/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", "/Trailer2",
- "/Emperor", "/Wayfarer", "/Euros", "/Hotdog", "/Club",
- "/Trailer3", "/Trailer4", "/Andromeda", "/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", "/Luggage Trailer2", "/Stair Trailer", "/Boxville",
- "/Farm Plow", "/Utility Trailer"
- };
- // public OnPlayerCommandReceived(playerid, cmdtext[])
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- for(new i=0; i<sizeof(VehicleCmdNames); i++)
- {
- // if(!strcmp (VehicleCmdNames[i], cmdtext, true))
- if(strfind(VehicleCmdNames[i], cmdtext) != -1)
- {
- // switch(i+400)
- // {
- // case 425, 432, 441, 406, 449, 464, 465, 501, 520, 537, 538, 564, 569, 570, 590, 591, 594, 606 .. 608, 610, 611: return SendClientMessage(playerid, -1, "Tego pojazdu nie można zespawnować!");
- // }
- new vid = SpawnVehicle_InfrontOfPlayer2(playerid, i+400, -1, -1);
- LinkVehicleToInterior(vid, GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(vid, GetPlayerVirtualWorld(playerid));
- new string2[64];
- format(string2, sizeof(string2), "Tworzysz %s", VehicleCmdNames[i]);
- SendClientMessage(playerid, -1, string2);
- PutPlayerInVehicle(playerid, vid, 0);
- return false;
- }
- }
- return true;
- }
- SpawnVehicle_InfrontOfPlayer2(playerid, vehiclemodel, color1, color2)
- {
- new Float:x,Float:y,Float:z;
- new Float:facing;
- new Float:distance;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, facing);
- new Float:size_x,Float:size_y,Float:size_z;
- GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO_SIZE, size_x, size_y, size_z);
- distance = size_x + 0.5;
- x += (distance * floatsin(-facing, degrees));
- y += (distance * floatcos(-facing, degrees));
- facing += 90.0;
- if(facing > 360.0) facing -= 360.0;
- return CreateVehicle(vehiclemodel, x, y, z + (size_z * 0.25), facing, color1, color2, -1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement