Mechanic.
#4

I'm not going to give you any code since this is really simple. Try this:

1. First, you check in the CMD whether there is a vehicle in range of the point the player is currently at.
2. Then you start a Timer, preferrably SetTimerEx and start the animation.
3. You create the timer public and forward it.
4. In the timer public, you clear all animations and set the vehicles health to whatever you want.

EDIT: This is what I found.
pawn Code:
public GetClosestVehicleFromPlayer(playerid)
{
    new Float:dis = 99999999.0;
    new veh = -1;
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    for(new i = 1; i < MAX_VEHICLES; i++)
    {
        new Float:distance = GetVehicleDistanceFromPoint(i, x, y, z);
        if(distance < dis)
        {
            dis = distance;
            veh = i;
        }
    }
    return veh;
}
Reply


Messages In This Thread
Mechanic. - by mkmk - 27.10.2014, 10:52
Re: Mechanic. - by Manyula - 27.10.2014, 12:00
Re: Mechanic. - by mkmk - 27.10.2014, 12:01
Re: Mechanic. - by Manyula - 27.10.2014, 12:05
Re: Mechanic. - by mkmk - 27.10.2014, 14:25
Re: Mechanic. - by Rudy_ - 27.10.2014, 14:27
Re: Mechanic. - by mkmk - 27.10.2014, 14:31
Re: Mechanic. - by Rudy_ - 27.10.2014, 14:44
Re: Mechanic. - by Manyula - 27.10.2014, 21:48

Forum Jump:


Users browsing this thread: 2 Guest(s)