Shitting Vehicle Names :D
#1

I am found this from wiki.sa-mp ;
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  new string[50];
  format(string, sizeof(string), "You entered vehicle: %d", vehicleid);
  GameTextForPlayer(playerid, string, 3000, 4);
 
  return 1;
}
It saying vehicle id but i need vehicle name (example : it says "You entered vehicle 522" but i need "You entered vehicle NRG-500) please help me
Reply
#2

You'll need an array with all vehicle names, then the function "GetVehicleNameFromID"
Reply
#3

it robbing my time
Reply
#4

pawn Код:
new VehicleNames[212][] =
{
  "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster",
  "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  "Esperanto", "Taxi", "Washington", "Bobcat", "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", "Cropduster", "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", "Monster",
  "Uranus", "Jester", "Sultan", "Stratium", "Elegy", "Raindance", "RC-Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30",
  "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  "Freight Box", "Trailer", "Andromada", "Dodo", "RC-Cam", "Launch", "Police Car", "Police Car", "Police Car",
  "Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs",
  "Boxville", "Tractor Carriage", "Utility Trailer"
};

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  new string[20];
  format(string, sizeof(string), "~g~%s", VehicleNames[GetVehicleModel(vehicleid)-400]);
  GameTextForPlayer(playerid, string, 3000, 4);
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)