Car not blow up
#1

Does someone have a filterscript or a script, when the car will get damage, the vehicle just to freeze and not to be able to move, not to explode, i think you understand me good Thank for those who will give it to me
Reply
#2

Add this to your gamemode instead:

Код:
public OnPlayerUpdate (playerid)
{
    if (IsPlayerInAnyVehicle(playerid))
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        new Float:health;
        GetVehicleHealth(vehicleid, health);
	    if (health < 300)
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            SetVehicleHealth (vehicleid, 300);
            GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
	        SendClientMessage (playerid, -1, "Your vehicle is no longer working!");
         }
     }
    return 1;
}
It will disable the vehicle's engine when the health of the vehicle is low, making it unmovable but the health will still be high enough to prevent an explosion.
Reply
#3

This isn't the right place to request scripts, although you can set the cars health to 300 if it goes below 260 (using timers or some other method to detect) and turn off the engine.
Reply
#4

Sorry I didn't know where to search for the script, anyway thank you. If there is someone who locks threads, i find what i need, he can lock it.
Reply
#5

Quote:
Originally Posted by CarlosScripter
Посмотреть сообщение
Sorry I didn't know where to search for the script, anyway thank you. If there is someone who locks threads, i find what i need, he can lock it.
OFF-TOPIC: As the other poster said this is not where to post script help.

ON-TOPIC: You can use that script above but make sure you set a variable to say that vehicle is broken else and stop them from using your engine command again by checking the variable within that command!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)