Locating vehicles
#1

So I want when a player spawns, he finds a list of his vehicles and locations, but lets get to the vehicles only for now and I'll add the locations once I know how to list the vehicles
PHP код:
//That's how I get the vehicle owner/s name, and I know how to match it when a player name
new file[60],vehicleowner[24];
    for(new 
i = 0; i < MAX_VEHICLES_BUILT; i++)
    {
        
format(file,sizeof(file),"Vehicles/%i.ini",i);
        if(
fexist(file))
        {
            
INI_ParseFile(file, "LoadVehicles_%s", .bExtra = true, .extra = i);
            
format(vehicleowner, sizeof(vehicleowner), "%s", VInfo[i][Owner]);
//matching with a name
if(strcmp(pName,VInfo[i][Owner]) == 0) 
The question here is how to make a list of cars in chat like:
1. Infernus -will addd the location here later
2. Bullet -wl;l add the location here later
3. FCR -........

thank you
Reply
#2

You need have array with vehicle names then in loading
VInfo[i][Model] or for vehicleid VInfo[i][vID] = CreateVehicle(...

and SendClientMessage(playerid,-1, VehicleName[VInfo[i][Model] - 400]);
or
SendClientMessage(playerid,-1, VehicleName[GetVehicleModel(VInfo[i][vID]) - 400]);
Reply


Forum Jump:


Users browsing this thread: