mustang Posted August 19, 2014 Share Posted August 19, 2014 السلام عليكم في عندي مشكله بي هاد الفنكشن إنه بس إلي أطلقه يشوف إل بزشن الجديد أي إنه بس بيشتغل بال كلاينت هل يوجد طريقة لحل هذه المشكله؟ مع العلم إنه لو كنت جالس جمب السائق تشوف التغيير زيه أما إلي بينظر من الخارج ما يشوف إل بزشن الجديد و شكرا setVehicleComponentPosition Link to comment
#DRAGON!FIRE Posted August 19, 2014 Share Posted August 19, 2014 الفنكشن جانب كلنت فقط يعني للاعب نفسه فقط . Link to comment
mustang Posted August 19, 2014 Author Share Posted August 19, 2014 الفنكشن جانب كلنت فقط يعني للاعب نفسه فقط . لا مو ضروري في فنقشن مثل إل playsound3d إذا عملتله ترجر من إل سيرفر يسمعه كل الأشخاض إلي جمبه مع إنه كلاينت بعدين أنا قلت إنه لو كنت جالس جمب إل سائق تشوف إل تغيير Link to comment
ALw7sH Posted August 19, 2014 Share Posted August 19, 2014 يمديك تسوي تحقق اذا شخص ركب السياره جنب السائق يشوف الاحداثيات الجديده حقتك بأنك تسوي تريقر من سيرفر الى كلنت Link to comment
#DRAGON!FIRE Posted August 19, 2014 Share Posted August 19, 2014 سوي تريقر من سيرفر لـ كلنت وان شاء الله تضبط . Link to comment
mustang Posted August 19, 2014 Author Share Posted August 19, 2014 سوي تريقر من سيرفر لـ كلنت وان شاء الله تضبط . هذا أول شي حاولت أسوي بس للأسف ما زبط Link to comment
#DRAGON!FIRE Posted August 19, 2014 Share Posted August 19, 2014 ورنا اكوادكـ يمكن في عندك اخطاء Link to comment
mustang Posted August 19, 2014 Author Share Posted August 19, 2014 server : function bindKeysOnJoin(source) bindKey(source, "l", "down", setit) end addEventHandler("onVehicleEnter", getRootElement(), bindKeysOnJoin) function bindKeysOnJoin2(source) unbindKey(source, "l", "down", setit) end addEventHandler("onVehicleExit", getRootElement(), bindKeysOnJoin2) function winghide(source, key, keystate, veh) triggerClientEvent( "setit", root, veh ) end Client : addEvent ( "setit", true ) --if the vehicle is a car addEventHandler ( "setit", root, function ( veh ) theVeh = getPedOccupiedVehicle(localPlayer) if (theVeh) then outputChatBox("Working !") --tester x, y, z = getVehicleComponentPosition(theVeh, "coveral") -- get the position of the component setVehicleComponentPosition(theVeh, "coveral", x, y+0.1, z) end) Link to comment
#DRAGON!FIRE Posted August 19, 2014 Share Posted August 19, 2014 نسخ لصق .. كل اكوادكـ خطا Link to comment
mustang Posted August 19, 2014 Author Share Posted August 19, 2014 نسخ لصق .. كل اكوادكـ خطا كيف غلط و شغال ؟ بعمل ترجر كلشي شغال بس ما هاد بيشوف البزشن غيري أو الجالس جمبي Link to comment
#DRAGON!FIRE Posted August 19, 2014 Share Posted August 19, 2014 addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _,p in ipairs ( getElementsByType ( "player" ) ) do bindKey ( p, "l", "down", triggerAll ) end end ) addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "l", "down", triggerAll ) end ) triggerAll = function ( player ) local vehicle = getPedOccupiedVehicle( player ) if ( vehicle ) then triggerClientEvent( root, "setit", root, vehicle ) end end Link to comment
mustang Posted August 19, 2014 Author Share Posted August 19, 2014 addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _,p in ipairs ( getElementsByType ( "player" ) ) do bindKey ( p, "l", "down", triggerAll ) end end ) addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "l", "down", triggerAll ) end ) triggerAll = function ( player ) local vehicle = getPedOccupiedVehicle( player ) if ( vehicle ) then triggerClientEvent( root, "setit", root, vehicle ) end end بجرب الكود بس يجي صديقي , شكرا Link to comment
#DRAGON!FIRE Posted August 19, 2014 Share Posted August 19, 2014 العفو .. بس نسيت اعدل جانب كلنت .. : addEvent ( "setit", true ) --if the vehicle is a car addEventHandler ( "setit", root, function ( vehicle ) outputChatBox("Working !") --tester x, y, z = getVehicleComponentPosition( vehicle, "coveral") -- get the position of the component setVehicleComponentPosition( vehicle, "coveral", x, y+0.1, z) end ) Link to comment
mustang Posted August 19, 2014 Author Share Posted August 19, 2014 العفو .. بس نسيت اعدل جانب كلنت .. : addEvent ( "setit", true ) --if the vehicle is a car addEventHandler ( "setit", root, function ( vehicle ) outputChatBox("Working !") --tester x, y, z = getVehicleComponentPosition( vehicle, "coveral") -- get the position of the component setVehicleComponentPosition( vehicle, "coveral", x, y+0.1, z) 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