Bueno lo que pasa es que estoy creando una zona de descanso por decirlo, es decir que cuando entro a la zona de descanso no me quiten energia desde afuera y que no me quite energia las caidas etc, tengo el script listo solo me falta la funcion de god mode o no se como se dira aqui el script:
function ZonadescansoEntrada ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
outputChatBox ( "entraste a la zona de descanso", thePlayer, 177, 252, 3 )
toggleControl ( thePlayer, "fire", false )
toggleControl ( thePlayer, "next_weapon", false )
toggleControl ( thePlayer, "previous_weapon", false )
setPedWeaponSlot ( thePlayer, 0 )
toggleControl ( thePlayer, "aim_weapon", false )
toggleControl ( thePlayer, "vehicle_fire", false )
toggleControl ( thePlayer, "vehicle_secondary_fire", false )
end
addEventHandler ( "onColShapeHit", zonadescanso, ZonadescansoEntrada )
function zonadescansoSalida ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
outputChatBox ( "Te has ido de la zona de descanso", thePlayer, 255, 0, 0 )
toggleControl ( thePlayer, "fire", true )
toggleControl ( thePlayer, "next_weapon", true )
toggleControl ( thePlayer, "previous_weapon", true )
toggleControl ( thePlayer, "aim_weapon", true )
toggleControl ( thePlayer, "vehicle_fire", true )
toggleControl ( thePlayer, "vehicle_secondary_fire", true )
end
addEventHandler ( "onColShapeLeave", zonadescanso, zonadescansoSalida )
Lo ideal seria que al entrar se active y al salir quede desactivado como podria hacerlo?
Nota: El script no esta funcionando ya que esta incompleto, esta la parte mas importante para asi ahorrar tiempo.