Jocker-dan Posted March 19, 2014 Share Posted March 19, 2014 ابيه اذا ضغط حرف x يصلح السيارة bindKey ( "x", "down", function (player) if getElementType ( player ) == "player" then if isPedInVehicle ( player ) then local vehicle = getPedOccupiedVehicle ( player ); if vehicle then fixVehicle ( player, vehicle ) end end end end Link to comment
فاّرس Posted March 19, 2014 Share Posted March 19, 2014 -- Client Side # bindKey ( 'x', 'down',function () if isPedInVehicle ( localPlayer ) then fixVehicle (getPedOccupiedVehicle ( localPlayer )) end end ) Link to comment
Jocker-dan Posted March 19, 2014 Author Share Posted March 19, 2014 مشكور طيب اذا ابيه يسوي انقلاب وش الوظيفة؟؟ Link to comment
فاّرس Posted March 19, 2014 Share Posted March 19, 2014 getElementRotation setElementRotation Link to comment
Jocker-dan Posted March 19, 2014 Author Share Posted March 19, 2014 getElementRotation setElementRotation مشكوور يالغالي Link to comment
Jocker-dan Posted March 19, 2014 Author Share Posted March 19, 2014 طيب يخوي ابي بس السايق يسوي اصلاح يعني الحين لو واحد يركب معك يضغط حرف x يقدر يسوي اصلاح ويسوي انقلاب ويخرب عليكك كيف اخليه بس السايق يقدر يسوي انقلاب او اصلاح ؟ Link to comment
iPrestege Posted March 19, 2014 Share Posted March 19, 2014 طيب يخويابي بس السايق يسوي اصلاح يعني الحين لو واحد يركب معك يضغط حرف x يقدر يسوي اصلاح ويسوي انقلاب ويخرب عليكك كيف اخليه بس السايق يقدر يسوي انقلاب او اصلاح ؟ getVehicleController Link to comment
#DRAGON!FIRE Posted March 19, 2014 Share Posted March 19, 2014 addEventHandler( "onResourceStart", resourceRoot, function( ) for _,plrs in ipairs( getElementsByType( "player" ) ) do bindKey( plrs, "x", "down", FixVehicle ) end end ) addEventHandler( "onPlayerJoin", root, function ( ) bindKey( source, "x", "down", FixVehicle ) end ) function FixVehicle ( player ) local vehicle = getPedOccupiedVehicle( player ) if ( vehicle and player == getVehicleController( vehicle ) ) then fixVehicle ( vehicle ) end 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