function fanFunction(thePlayer) bindKey (thePlayer,"u","down", function(thePlayer,key,state) if isPedInVehicle(thePlayer) then playervehicle = getPedOccupiedVehicle(thePlayer) if isVehicleDamageProof(playervehicle) then setVehicleDamageProof(playervehicle, false) setVehicleDoorsUndamageable(playervehicle, false) outputChatBox ( "invincable car disabled", thePlayer ) local playr = getPlayerName ( thePlayer ) myPlayer = getPlayerFromName ( "someone" ) if ( myPlayer ~= false ) then outputChatBox (playr .. " has disactivated invincable car ", myPlayer, 255, 0, 0 ) end else setVehicleDamageProof(playervehicle, true) setVehicleDoorsUndamageable(playervehicle, true) outputChatBox ( "invincable car enabled", thePlayer ) local playr = getPlayerName ( thePlayer ) myPlayer = getPlayerFromName ( "someone" ) if ( myPlayer ~= false ) then outputChatBox (playr .. " has activated invincable car ", myPlayer, 0, 255, 0 ) end end else outputChatBox ( "not in a vehicle", thePlayer, 255, 0, 0 ) end end ) end addEventHandler ("onResourceStart",getRootElement(),fanFunction)