mustang Posted August 20, 2014 Posted August 20, 2014 (edited) تم الحل Edited August 26, 2014 by Guest
mustang Posted August 20, 2014 Author Posted August 20, 2014 اطرح الكود الاصلي الكود الاصلي؟ هذا إل كود كامل أنا كاتبه ، مافي غير جانب السيرفر إلي إنته كتبته
mustang Posted August 20, 2014 Author Posted August 20, 2014 ? y انت تبي تحركـ الـ نعم لكن تدريجيا عشان يبين إنه بتحريك مو بينتقل
#DRAGON!FIRE Posted August 20, 2014 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 )
mustang Posted August 20, 2014 Author 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
mustang Posted August 20, 2014 Author 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
#DRAGON!FIRE Posted August 20, 2014 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 )
mustang Posted August 20, 2014 Author 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
mustang Posted August 20, 2014 Author Posted August 20, 2014 bad argument @ getVehicleComponentPosition expected vehicle at argument 1 got nil هاي المشكله
#DRAGON!FIRE Posted August 20, 2014 Posted August 20, 2014 Component جالسة تجي نل فـ تاكد من السيارة ومن نوع الـ y اخوي المشكلة مب من الكود .. لانه قيمة
mustang Posted August 20, 2014 Author Posted August 20, 2014 Component جالسة تجي نل فـ تاكد من السيارة ومن نوع الـ y اخوي المشكلة مب من الكود .. لانه قيمة إل سيارة أنا مصممها و إل component يتحرك على سكريبت ثاني
#DRAGON!FIRE Posted August 20, 2014 Posted August 20, 2014 غريب .. الكود صحيح .. المشكلة باستخدام الفنكشن .
mustang Posted August 20, 2014 Author 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
#DRAGON!FIRE Posted August 20, 2014 Posted August 20, 2014 غريب المشكلة ذي المفروض ما تواجهكـ الاكواد صحيحة ورني الكود بعد ما عدلت
mustang Posted August 20, 2014 Author 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 )
#DRAGON!FIRE Posted August 20, 2014 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 )
mustang Posted August 20, 2014 Author 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"
#DRAGON!FIRE Posted August 20, 2014 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 )
mustang Posted August 20, 2014 Author 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 ) مشكور بطل في أغلاط بس بيتحرك مرة وحده أو إل بزشن غلط
#DRAGON!FIRE Posted August 20, 2014 Posted August 20, 2014 ما ادري ولله هذي المشكلة مشكلة احداثيات انت زود ونقص لين يضبط معاكـ
mustang Posted August 20, 2014 Author Posted August 20, 2014 ما ادري ولله هذي المشكلة مشكلة احداثيات انت زود ونقص لين يضبط معاكـ المطلوب إنه يحرك كل عشر أجزاء من إل ثانيه بي قيم صغيره بس السكريبت حقك يحركه مرة وحده ، غلبتك معي والله
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