28.12.2012, 16:02
That worked thanks!
But when I enter one of my player vehicles, if I do not unstorage the car in slot one then when I enter another one of my player vehicles it will say.. 'You are the owner of this.. *Name of slot 1 vehicle*.' instead of the actual name, IDK why, I have made it print the vehicle ID's on the console and they are different to slot 1.
Code;
But when I enter one of my player vehicles, if I do not unstorage the car in slot one then when I enter another one of my player vehicles it will say.. 'You are the owner of this.. *Name of slot 1 vehicle*.' instead of the actual name, IDK why, I have made it print the vehicle ID's on the console and they are different to slot 1.
Code;
pawn Код:
for(new v; v < MAX_PLAYER_VEHICLES; v++) {
if(IsPlayerInVehicle(playerid, playerVehicles[playerid][v][cID])) {
format(string, sizeof(string), "You are the owner of this %s! (/help vehicles)", VehicleName[playerVehicles[playerid][v][cModelID] - 400]);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
printf("This is vehicle ID %d.", playerVehicles[playerid][v][cID]);
if(playerVehicles[playerid][v][cTickets] > 0) {
format(string, sizeof(string), "This vehicle has $%d worth of tickets! Head to City Hall to pay them off.", playerVehicles[playerid][v][cTickets]);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
}
return 1;
}
}

