06.02.2017, 16:05
How can I make a function out of this.
pvehicle[i] is the id of the vehicle, the way the vehicle is saved, example.
VehicleInfo[pvehicle[i]][vPlate];
And this is the test command
But how can I make this like.. not show 200 times also, can I make a function or something out of this so I don't have to make a loop everywhere I need the vehicle id?
pvehicle[i] is the id of the vehicle, the way the vehicle is saved, example.
VehicleInfo[pvehicle[i]][vPlate];
And this is the test command
PHP код:
CMD:testcar(playerid, params[])
{
new string[200];
for(new i; i < MAX_PVEHICLES; i++)
{
format(string, sizeof(string), "Vehicle ID: %d | Vehicle Type: %d, Plate: %s | Owner: %s", VehicleInfo[pvehicle[i]][ID], VehicleInfo[pvehicle[i]][vType], VehicleInfo[pvehicle[i]][vPlate], VehicleInfo[pvehicle[i]][vOwner] );
SCM(playerid, COLOR_YELLOW, string);
break;
}
return 1;
}

