Displaying vehicle model as name.
#1

When a player types /myvehicles, I want it to get his PlayerInfo[playerid][VehicleModel] and display it, but as the name of the vehicle.

I have this:
pawn Код:
new VehicleNames[][] =
{
    "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 A", "Hotring Racer B", "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",
    "Tiller", "Utility Trailer"
};
I don't know what to do from here.(I've searched on the forums and can't find it so don't bother saying "search"
EDIT: for example,
pawn Код:
CMD:myvehicles(playerid, params[])
{
    if(PlayerInfo[playerid][pVehicle1] != 0 && PlayerInfo[playerid][pVehicle2] != 0 && PlayerInfo[playerid][pVehicle3] != 0)
    {
        new string[128];
        format(string, sizeof(string), "%s\n%s\n%s");
        ShowPlayerDialog(playerid, DIALOG_MYVEH, DIALOG_STYLE_LIST, "Your current vehicles:", string, "Info", "Cancel");
    }
    return 1;
}
I want it to display vehicle name where the %s is.
Reply


Messages In This Thread
Displaying vehicle model as name. - by Zeppo - 29.03.2014, 18:40
Re: Displaying vehicle model as name. - by Abagail - 29.03.2014, 18:52
Re: Displaying vehicle model as name. - by Zeppo - 29.03.2014, 18:58
Re: Displaying vehicle model as name. - by Niko_boy - 29.03.2014, 19:06
Re: Displaying vehicle model as name. - by Konstantinos - 29.03.2014, 19:20
Re: Displaying vehicle model as name. - by Zeppo - 29.03.2014, 19:37
Re: Displaying vehicle model as name. - by Konstantinos - 29.03.2014, 19:43
Re: Displaying vehicle model as name. - by Zeppo - 29.03.2014, 19:48
Re: Displaying vehicle model as name. - by Konstantinos - 29.03.2014, 19:55
Re: Displaying vehicle model as name. - by Zeppo - 29.03.2014, 21:06

Forum Jump:


Users browsing this thread: 3 Guest(s)