Dr.Xen Posted March 5, 2014 Share Posted March 5, 2014 السلام عليكم ورحمة الله وبركاته.. ابي تصحيح للكود local key = "lshift" addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, key, "down", Jump ) end ) function Jump ( player ) if ( isPedInVehicle ( player) ) then local veh = getPedOccupiedVehicle ( player ) if ( isVehicleOnGround ( veh ) ) then local vx, vy, vz = getElementVelocity ( veh ) setElementVelocity ( veh, vx, vy, vz + 0.3 ) end end end Link to comment
فاّرس Posted March 5, 2014 Share Posted March 5, 2014 -- Server Side # local key = "lshift" function Jump ( player ) if ( isPedInVehicle ( player) ) then local veh = getPedOccupiedVehicle ( player ) if ( isVehicleOnGround ( veh ) ) then local vx, vy, vz = getElementVelocity ( veh ) setElementVelocity ( veh, vx, vy, vz + 0.3 ) end end end for k,v in ipairs(getElementsByType'player') do bindKey(v,key,'down',Jump) end addEventHandler ( 'onPlayerJoin', root,function ( ) bindKey ( source, key, "down", Jump ) end ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now