Vehicle death issue
#16

Quote:
Originally Posted by Emre__
View Post
We want the vehicle re-spawn and call the callback OnVehicleDeath.
pawn Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    new
        Float: vH;
       
    GetVehicleHealth(vehicleid, vH);
    if (vH < 250.0)
    {
        CallRemoteFunction("OnVehicleDeath", "ii", vehicleid, forplayerid);
        SetTimerEx("RespawnBuggedVehicle", 1000, false, "i", vehicleid);
    }
    return 1;
}

forward RespawnBuggedVehicle(vehicleid);
public RespawnBuggedVehicle(vehicleid)
{
    SetVehicleToRespawn(vehicleid);
}
It calls OnVehicleDeath, it re-spawns the vehicle and OnVehicleSpawn is called too after that. I'm not really sure whether it's going to work well with more players.
Reply


Messages In This Thread
Vehicle death issue - by MP2 - 31.01.2014, 22:54
Re: Vehicle death issue - by pyrodojo25 - 31.01.2014, 23:00
Re: Vehicle death issue - by MP2 - 02.02.2014, 15:06
Re: Vehicle death issue - by FufLa - 02.02.2014, 16:20
Re: Vehicle death issue - by Hanger - 02.02.2014, 16:38
Re: Vehicle death issue - by sony112502 - 02.02.2014, 16:41
Re: Vehicle death issue - by MP2 - 02.02.2014, 16:46
Re: Vehicle death issue - by DiDok - 02.02.2014, 16:49
Re: Vehicle death issue - by sony112502 - 02.02.2014, 16:54
Re: Vehicle death issue - by DiDok - 02.02.2014, 18:35
Re: Vehicle death issue - by Emre__ - 05.02.2014, 10:29
Re: Vehicle death issue - by Rajat_Pawar - 05.02.2014, 11:32
Re: Vehicle death issue - by Konstantinos - 05.02.2014, 11:34
Re: Vehicle death issue - by Emre__ - 05.02.2014, 11:40
Re: Vehicle death issue - by Rajat_Pawar - 05.02.2014, 11:41
Re: Vehicle death issue - by Konstantinos - 05.02.2014, 12:20
Re: Vehicle death issue - by Emre__ - 05.02.2014, 12:29
Re: Vehicle death issue - by spell - 05.02.2014, 16:40
Respuesta: Re: Vehicle death issue - by Gryphus One - 05.02.2014, 21:26
Re: Vehicle death issue - by Reboma - 05.02.2014, 22:49

Forum Jump:


Users browsing this thread: 1 Guest(s)