Cars Never Explode??
#3

You're going to have to create a parameter-less callback then run a loop every run.

pawn Код:
public OnGameModeInit()
{
    SetTimer("MyCallBack",500,1);
}
forward MyCallBack();
public MyCallBack()
{
    new Float:vhp;
    for(new vehicleid; vehicleid<MAX_VEHICLES;vehicleid++)
    {
        if(GetVehicleModel(vehicleid)==0)continue; //only returns 0 when vehicle is invalid (not spawned)
        GetVehicleHealth(vehicleid,vhp);
        if(vhp<300.0)SetVehicleHealth(vehicleid,300);
    }
}
Reply


Messages In This Thread
Cars Never Explode?? - by stuoyto - 09.05.2012, 19:47
Re: Cars Never Explode?? - by kadaradam - 09.05.2012, 19:52
Re: Cars Never Explode?? - by Joe Staff - 09.05.2012, 19:52
Re: Cars Never Explode?? - by stuoyto - 09.05.2012, 19:54
Re: Cars Never Explode?? - by kadaradam - 09.05.2012, 19:56
Re: Cars Never Explode?? - by stuoyto - 09.05.2012, 20:02

Forum Jump:


Users browsing this thread: 2 Guest(s)