Totaled Scripts
#4

Alright, the first thing you should do is have a vehicle engine variable, in my case I use:
pawn Код:
new vehEngine[MAX_PLAYERS];
At the top portion of the script.
Then I would create a timer when a player gets into a vehicle:
pawn Код:
SetTimerEx("Total", 1000, true, "i", playerid);
And then forward it with all your other forwards:
pawn Код:
forward Total(playerid);
Then I would create the public for that.
pawn Код:
Public Total (playerid) //This is probably not right, I'm typing it in this textbox, not the compiler.
{
    new VehHealth = GetVehicleHealth(playerid);
    if (VehHealth <= 300)
    {
        SetVehicleParams(vehicleid, 0, -1, -1, -1, -1, -1);
    }
    return 1;
}
Also be sure to make it to where the "Total" timer stops when the player exits the vehicle.

Note that this is probably buggy as I havn't scripted in a while, lemme know of any bugs or issues and I will gladly fix them.
Reply


Messages In This Thread
Totaled Scripts - by Jizz - 17.06.2013, 01:37
Re: Totaled Scripts - by DobbysGamertag - 17.06.2013, 01:40
Re: Totaled Scripts - by Jizz - 17.06.2013, 03:27
Re: Totaled Scripts - by nmader - 17.06.2013, 03:38
Re: Totaled Scripts - by Alternative112 - 17.06.2013, 05:00
Re: Totaled Scripts - by Pottus - 17.06.2013, 05:59
Re: Totaled Scripts - by Alternative112 - 17.06.2013, 17:55
Re: Totaled Scripts - by DobbysGamertag - 18.06.2013, 02:50

Forum Jump:


Users browsing this thread: 1 Guest(s)