Jump to content

Zerar Handling VS Area Verde


Recommended Posts

Olá pessoal, queria saber se tem como zerar uma Handling, vou explicar.

aquelas Handling's desagradáveis que, quando você está parado em um lugar e de repente chega um cara e te joga pra bem longe. quero saber se tem como setar uma Handling com o valor 0 ao entrar na área verde.

pelomenos algum exemplo já me ajuda :|

esse é uma parte do meu código

addEventHandler ("onColShapeHit", getRootElement(),  
function(hitElement, matchingDimension) 
  if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then 
    outputChatBox ("", hitElement, 255, 0, 0, true) 
    toggleControl (hitElement, "fire", false) 
    toggleControl (hitElement, "next_weapon", false) 
    toggleControl (hitElement, "previous_weapon", false) 
    toggleControl (hitElement, "sprint", true) 
    toggleControl (hitElement, "aim_weapon", false) 
    toggleControl (hitElement, "vehicle_fire", false) 
    showPlayerHudComponent (hitElement, "ammo", false) 
    showPlayerHudComponent (hitElement, "weapon", false) 
    triggerClientEvent (hitElement, "enableGodMode", hitElement) 
  end 
  if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then 
    setElementVelocity (hitElement, 0, 0, 0) 
    setElementPosition (hitElement, 2018.33, 1534.77, 12.37) 
    setVehicleRotation (hitElement, 0,0,270) 
    if (getVehicleOccupant (hitElement, 0)) then 
      outputChatBox ("", getVehicleOccupant (hitElement, 0), 255, 0, 0, false) 
    end 
  end 
end) 
  
addEventHandler ("onColShapeLeave", getRootElement(),  
function(leaveElement, matchingDimension) 
  if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then 
    outputChatBox ("", leaveElement, 255, 0, 0, false) 
    toggleControl (leaveElement, "fire", true) 
    toggleControl (leaveElement, "next_weapon", true) 
    toggleControl (leaveElement, "previous_weapon", true) 
    toggleControl (leaveElement, "sprint", true) 
    toggleControl (leaveElement, "aim_weapon", true) 
    toggleControl (leaveElement, "vehicle_fire", true) 
    showPlayerHudComponent (leaveElement, "ammo", false) 
    showPlayerHudComponent (leaveElement, "weapon", false) 
    triggerClientEvent (leaveElement, "disableGodMode", leaveElement) 
  end 
end) 

Link to comment

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...