mustang Posted August 20, 2014 Share Posted August 20, 2014 (edited) تم الحل Edited August 26, 2014 by Guest Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 اطرح الكود الاصلي الكود الاصلي؟ هذا إل كود كامل أنا كاتبه ، مافي غير جانب السيرفر إلي إنته كتبته Link to comment
#DRAGON!FIRE Posted August 20, 2014 Share Posted August 20, 2014 ? y انت تبي تحركـ الـ Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 ? y انت تبي تحركـ الـ نعم لكن تدريجيا عشان يبين إنه بتحريك مو بينتقل Link to comment
#DRAGON!FIRE Posted August 20, 2014 Share Posted August 20, 2014 جرب هذا .. : local Mover = 0 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 moveT = setTimer ( function ( ) if ( Mover >= 4 ) then killTimer ( moveT ) end Mover = Mover + 0.001 end, 500, 0 ) setVehicleComponentPosition( vehicle, "coveral", x, y+Mover, z) end ) Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 جرب هذا .. : local Mover = 0 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 moveT = setTimer ( function ( ) if ( Mover >= 4 ) then killTimer ( moveT ) end Mover = Mover + 0.001 end, 500, 0 ) setVehicleComponentPosition( vehicle, "coveral", x, y+Mover, z) end ) ok Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 جرب هذا .. : local Mover = 0 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 moveT = setTimer ( function ( ) if ( Mover >= 4 ) then killTimer ( moveT ) end Mover = Mover + 0.001 end, 500, 0 ) setVehicleComponentPosition( vehicle, "coveral", x, y+Mover, z) end ) ok ما بينتقل غير مرة وحده و بعض نصف ثانيه من تفعيل الفنكشن و إل قيمه إلي أريد إذا ازيده هي 0.001 ليس mover + 0.001 Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 ولكن اذا ال Y وصل >=4.31 يوقف اللوب Link to comment
#DRAGON!FIRE Posted August 20, 2014 Share Posted August 20, 2014 طيب جرب كذا وانا حطيت 1 يعني كل شوية يزود 1 فـ انت زود الرقم ممكن تلاحظه سريع او بطيئ زود او نقص الرقم لين يصير تمام local Mover = 0 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 moveT = setTimer ( function ( ) if ( Mover >= y ) then killTimer ( moveT ) end Mover = Mover + 1 end, 500, 0 ) setVehicleComponentPosition( vehicle, "coveral", x, Mover, z) end ) Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 طيب جرب كذا وانا حطيت 1 يعني كل شوية يزود 1 فـ انت زود الرقم ممكن تلاحظه سريع او بطيئ زود او نقص الرقم لين يصير تمام local Mover = 0 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 moveT = setTimer ( function ( ) if ( Mover >= y ) then killTimer ( moveT ) end Mover = Mover + 1 end, 500, 0 ) setVehicleComponentPosition( vehicle, "coveral", x, Mover, z) end ) if ( Mover >= y ) then killTimer ( moveT ) end attempt to compare nil with number Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 bad argument @ getVehicleComponentPosition expected vehicle at argument 1 got nil هاي المشكله Link to comment
#DRAGON!FIRE Posted August 20, 2014 Share Posted August 20, 2014 Component جالسة تجي نل فـ تاكد من السيارة ومن نوع الـ y اخوي المشكلة مب من الكود .. لانه قيمة Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 Component جالسة تجي نل فـ تاكد من السيارة ومن نوع الـ y اخوي المشكلة مب من الكود .. لانه قيمة إل سيارة أنا مصممها و إل component يتحرك على سكريبت ثاني Link to comment
#DRAGON!FIRE Posted August 20, 2014 Share Posted August 20, 2014 غريب .. الكود صحيح .. المشكلة باستخدام الفنكشن . Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 غريب .. الكود صحيح .. المشكلة باستخدام الفنكشن . theVeh = getPedOccupiedVehicle(localPlayer) استبدلت vehicle ب theveh و الأمور زبطط بس في مشكله أخرى "bad argument @ killtimer epxected lua-timer at argument 1" and also the component moves 1 time only with the wrong value Link to comment
#DRAGON!FIRE Posted August 20, 2014 Share Posted August 20, 2014 غريب المشكلة ذي المفروض ما تواجهكـ الاكواد صحيحة ورني الكود بعد ما عدلت Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 غريب المشكلة ذي المفروض ما تواجهكـ الاكواد صحيحة ورني الكود بعد ما عدلت local Mover = 0 addEvent ( "setit", true ) --if the vehicle is a car addEventHandler ( "setit", root, function ( theVeh ) theVeh = getPedOccupiedVehicle(localPlayer) outputChatBox("Working !") --tester x, y, z = getVehicleComponentPosition( theVeh, "coveral") -- get the position of the component moveT = setTimer ( function ( ) if ( Mover >= y ) then killTimer ( moveT ) end Mover = Mover + 0.001 end, 500, 0 ) setVehicleComponentPosition( theVeh, "coveral", x, Mover, z) end ) Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 إنت متأكد إنه مفروض يتحرك أكثر من مرة ؟ Link to comment
#DRAGON!FIRE Posted August 20, 2014 Share Posted August 20, 2014 local Mover = 0 addEvent ( "setit", true ) --if the vehicle is a car addEventHandler ( "setit", root, function ( theVeh ) Mover = 0 theVeh = getPedOccupiedVehicle(localPlayer) outputChatBox("Working !") --tester x, y, z = getVehicleComponentPosition( theVeh, "coveral") -- get the position of the component Timer = setTimer ( function ( ) if ( Mover >= y ) then killTimer ( Timer ) end Mover = Mover + 0.001 end, 500, 0 ) setVehicleComponentPosition( theVeh, "coveral", x, Mover, z) end ) Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 local Mover = 0 addEvent ( "setit", true ) --if the vehicle is a car addEventHandler ( "setit", root, function ( theVeh ) Mover = 0 theVeh = getPedOccupiedVehicle(localPlayer) outputChatBox("Working !") --tester x, y, z = getVehicleComponentPosition( theVeh, "coveral") -- get the position of the component Timer = setTimer ( function ( ) if ( Mover >= y ) then killTimer ( Timer ) end Mover = Mover + 0.001 end, 500, 0 ) setVehicleComponentPosition( theVeh, "coveral", x, Mover, z) end ) "bad argument @ killtimer epxected lua-timer at argument 1" Link to comment
#DRAGON!FIRE Posted August 20, 2014 Share Posted August 20, 2014 local Mover = 0 addEvent ( "setit", true ) --if the vehicle is a car addEventHandler ( "setit", root, function ( theVeh ) Mover = 0 theVeh = getPedOccupiedVehicle(localPlayer) outputChatBox("Working !") --tester x, y, z = getVehicleComponentPosition( theVeh, "coveral") -- get the position of the component Timer = setTimer ( function ( ) if ( Mover >= y ) then if ( isTimer ( Timer ) ) then killTimer ( Timer ) end end Mover = Mover + 0.001 end, 500, 0 ) setVehicleComponentPosition( theVeh, "coveral", x, Mover, z) end ) Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 local Mover = 0 addEvent ( "setit", true ) --if the vehicle is a car addEventHandler ( "setit", root, function ( theVeh ) Mover = 0 theVeh = getPedOccupiedVehicle(localPlayer) outputChatBox("Working !") --tester x, y, z = getVehicleComponentPosition( theVeh, "coveral") -- get the position of the component Timer = setTimer ( function ( ) if ( Mover >= y ) then if ( isTimer ( Timer ) ) then killTimer ( Timer ) end end Mover = Mover + 0.001 end, 500, 0 ) setVehicleComponentPosition( theVeh, "coveral", x, Mover, z) end ) مشكور بطل في أغلاط بس بيتحرك مرة وحده أو إل بزشن غلط Link to comment
#DRAGON!FIRE Posted August 20, 2014 Share Posted August 20, 2014 ما ادري ولله هذي المشكلة مشكلة احداثيات انت زود ونقص لين يضبط معاكـ Link to comment
mustang Posted August 20, 2014 Author Share Posted August 20, 2014 ما ادري ولله هذي المشكلة مشكلة احداثيات انت زود ونقص لين يضبط معاكـ المطلوب إنه يحرك كل عشر أجزاء من إل ثانيه بي قيم صغيره بس السكريبت حقك يحركه مرة وحده ، غلبتك معي والله 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