Jump to content

يغلق


Recommended Posts

جرب هذا .. :

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
جرب هذا .. :

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
جرب هذا .. :

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

طيب جرب كذا وانا حطيت 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
طيب جرب كذا وانا حطيت 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
Component جالسة تجي نل فـ تاكد من السيارة ومن نوع الـ y اخوي المشكلة مب من الكود .. لانه قيمة

إل سيارة أنا مصممها و إل component يتحرك على سكريبت ثاني

Link to comment
غريب .. الكود صحيح .. المشكلة باستخدام الفنكشن .
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
غريب المشكلة ذي المفروض ما تواجهكـ الاكواد صحيحة

ورني الكود بعد ما عدلت

    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

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
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

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
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
ما ادري ولله هذي المشكلة مشكلة احداثيات انت زود ونقص لين يضبط معاكـ

المطلوب إنه يحرك كل عشر أجزاء من إل ثانيه بي قيم صغيره بس السكريبت حقك يحركه مرة وحده ، غلبتك معي والله

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...