13.05.2014, 16:19
You can probably make a player variable. Just do this:
pawn Код:
new repairedVehicle[MAX_PLAYERS]; // global (put this after the includes or defines w/e)
// OnPlayerConnect
repairedVehicle[playerid] = 0; // resetting the variable so that it may not set the previous playerid value
// Whenever you repair a vehicle, just simply set this variable to 1
RepairVehicle(vehicleid); // vehicle is repaired
repairedVehicle[playerid] = 1; // so we will set this to true/1 that the player have updated his vehicle
// Now if you wanted to check if the player vehicle is repaired
if(repairedVehicle[playerid] != 0)
{
printf("playerid %i has already repaired his vehicle", playerid);
}
else
{
printf("playerid %i did not repaired his vehicle yet", playerid);
}