Jocker-dan Posted March 19, 2014 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
فاّرس Posted March 19, 2014 Posted March 19, 2014 -- Client Side # bindKey ( 'x', 'down',function () if isPedInVehicle ( localPlayer ) then fixVehicle (getPedOccupiedVehicle ( localPlayer )) end end )
Jocker-dan Posted March 19, 2014 Author Posted March 19, 2014 مشكور طيب اذا ابيه يسوي انقلاب وش الوظيفة؟؟
Jocker-dan Posted March 19, 2014 Author Posted March 19, 2014 getElementRotation setElementRotation مشكوور يالغالي
Jocker-dan Posted March 19, 2014 Author Posted March 19, 2014 طيب يخوي ابي بس السايق يسوي اصلاح يعني الحين لو واحد يركب معك يضغط حرف x يقدر يسوي اصلاح ويسوي انقلاب ويخرب عليكك كيف اخليه بس السايق يقدر يسوي انقلاب او اصلاح ؟
iPrestege Posted March 19, 2014 Posted March 19, 2014 طيب يخويابي بس السايق يسوي اصلاح يعني الحين لو واحد يركب معك يضغط حرف x يقدر يسوي اصلاح ويسوي انقلاب ويخرب عليكك كيف اخليه بس السايق يقدر يسوي انقلاب او اصلاح ؟ getVehicleController
#DRAGON!FIRE Posted March 19, 2014 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
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