Solidk9 Posted March 29, 2008 Share Posted March 29, 2008 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 ) Would have been awsome if it got fixed soon because there are alot of game modes possabilaty with the parashoot (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
Ace_Gambit Posted March 29, 2008 Share Posted March 29, 2008 (I've tryed to search the forum for a simular bug about the parashoot, didnt find any post's about it) That's probably because it is spelled "parachute" instead of "parashoot" . Link to comment
tma Posted March 29, 2008 Share Posted March 29, 2008 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
darkdreamingdan Posted April 13, 2008 Share Posted April 13, 2008 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
Phat Looser Posted May 8, 2008 Share Posted May 8, 2008 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
Recommended Posts