How to detect a function
#3

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);
}
Reply


Messages In This Thread
How to detect a function - by Lidor124 - 13.05.2014, 15:58
Re: How to detect a function - by Madd92 - 13.05.2014, 16:15
Re: How to detect a function - by iZN - 13.05.2014, 16:19

Forum Jump:


Users browsing this thread: 2 Guest(s)