Jump to content

Parashoot not opening bug


Solidk9

Recommended Posts

The parashoot doesnt seem to work properly.

When I jump down from a building while having the parashoot in my inventory it doesnt want to open, all it does is to fall as if you dont have a parashoot.

Is it because its not synced or not synced right ? or do we have to add LUA codes in the server for it to work

(Haven't got a clue about sync n stuff :D )

Would have been awsome if it got fixed soon because there are alot of game modes possabilaty with the parashoot 8)

(I've tryed to search the forum for a simular bug about the parashoot, didnt find any post's about it)

GL & HF

Link to comment

The parachute isn't implemented in DP2. You can be given one and seen to be wearing one but it won't function (until DP3 I think). There are fake parachutes out there but they're just an attached model and low gravity - no actual air control.

Link to comment
  • 2 weeks later...

Yeah this isnt really a bug, its not implemented. In actual fact it needs to be written in Lua - for those of you who didnt know, in single player the parachute is also scripted using the mission script. MTA doesnt use the mission script, so it isnt possible to implement it this way.

Once we get necessary functions such as proper animations this shouldnt be a problem to implement as a resource.

Link to comment
  • 4 weeks later...

Here, have a paraheli instead of a parachute.

Server:

local miniheli   = {} 
  
function startFallschirm( ) 
 x,y,z=getElementPosition(source) 
 miniheli[source]= createVehicle(465,x,y,z) 
 warpPlayerIntoVehicle ( source , miniheli[source], 0 ) 
end 
  
function stopFallschirm ( ) 
 if (miniheli[source] ) then 
 removePlayerFromVehicle ( source ) 
 destroyElement(miniheli[source]) 
 miniheli[source]=nil 
 end 
end 
  
  
addEvent ( "startFallschirm" , true) 
addEventHandler ( "startFallschirm", getRootElement(), startFallschirm ) 
addEvent ( "stopFallschirm" , true) 
addEventHandler ( "stopFallschirm", getRootElement(), stopFallschirm ) 
addEventHandler ("onPlayerQuit",getRootElement(),stopFallschirm) 
  

Client:

local timer 
local fallschirmOffen = false 
local fallschirm 
local vehicle 
  
function isPlayerFalling () 
 local x,y,z = getElementPosition(getLocalPlayer()) 
 local ground = getGroundPosition ( x, y, z ) 
 if ( z > ground+10 and isPlayerDoingTask (getLocalPlayer(), "TASK_SIMPLE_IN_AIR" ) ) then 
  return true 
 else 
  return false 
 end 
end 
  
function isPlayerStanding() 
 local x,y,z = getElementPosition(getLocalPlayer()) 
 local ground = getGroundPosition ( x, y, z ) 
 if z<=ground+4 then 
  return true  
 else 
  return false  
 end 
end 
  
  
function fallschirmCheck () 
 if (isPlayerFalling()==true and fallschirmOffen==false) then 
  fallschirmOffen=true 
  setElementVelocity (getLocalPlayer(),0,0,0) 
  local x,y,z = getElementPosition(getLocalPlayer())  
  setElementAlpha(getLocalPlayer(),1) 
  startFallschirm() 
 end 
end 
  
function startFallschirm () 
 local x,y,z = getElementPosition(getLocalPlayer())  
 timer = setTimer(every100msFallschirm,100,0) 
 triggerServerEvent("startFallschirm",getLocalPlayer()) 
end 
  
function every100msFallschirm () 
 local x,y,z = getElementPosition(getLocalPlayer()) 
 if (isPlayerStanding()==true) then 
  killTimer(timer) 
  triggerServerEvent("stopFallschirm",getLocalPlayer()) 
  setElementAlpha(getLocalPlayer(),255) 
  fallschirmOffen=false 
 else 
  vehicle = getPlayerOccupiedVehicle(getLocalPlayer()) 
  if (vehicle) then 
   local x,y,z = getElementVelocity(vehicle) 
   if (z>-0.2) then 
    setElementVelocity(vehicle,x,y,-0.2) 
   end 
  else 
  killTimer(timer) 
  triggerServerEvent("stopFallschirm",getLocalPlayer()) 
  setElementAlpha(getLocalPlayer(),255) 
  fallschirmOffen=false 
  end 
 end 
end 
  
  
function fallschirmStart() 
 bindKey ( "mouse1", "down", fallschirmCheck) 
end 
function fallschirmStop() 
 unbindKey ( "mouse1", "down", fallschirmCheck) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()) , fallschirmStart) 
addEventHandler( "onClientResourceStop", getResourceRootElement(getThisResource()) , fallschirmStop) 

Link to comment
  • Recently Browsing   0 members

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