Jump to content

Weird thingy


qaisjp

Recommended Posts

  • MTA Team
Posted

I'm making a small gamemode and part of it contains this:

  
function onVehicleStartExit(player, seat, jack, door) 
    if ACTIVE[player] == true then 
        setElementHealth(source, 100) 
        setVehicleDamageProof(source, true) 
        setTimer(setElementAlpha, 50, 101, source, getElementAlpha(source)-1) 
        setTimer(destroy, 5050, 1, source) 
        killPed(player) 
    end 
end 
addEventHandler("onVehicleStartExit", root, onVehicleStartExit) 
  

When ACTIVE[player] is false, everything is normal. But when it is true, I die (yay) but the vehicle goes on fire :o. This isn't possible...

Help me please :P

EDIT: After testing without killPed, it goes on fire...

Posted

So the vehicle is suppose to be on fire when you die?

if yes, then use

  
local vehicle = getPedOccupiedVehicle(player) 
blowVehicle(vehicle, true) -- true means that it'll explode 
  

  • MTA Team
Posted

Nonono, lol. It automatically goes on fire when use my script, i dont want it to go on fire!

Posted

i think you actually don't want it to go on fire

if yes, then @ setElementHealth use "1000" instead of "100"

any value less than 250 makes the car go on fire :)

I tested this a while ago.

  • MTA Team
Posted

Ooooooh! LMFAO! So max isnt 100, its 1000 O_O. Thanks! (Please close this to prevent any unneeded bumps)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...