Jump to content

للخبراء بالبرمجه يدخلو


Recommended Posts

بما إني معطيه الكود صح ليه تجي ترد وتقول هذا صح ,

:shock:

كلها الاثنين صح

:!::!:

وكأنك طرحت كود جديد ,

خلاص عطيته الكود صح ليه تبي تعطيه مره ثانيه ؟

الله لا يبلانا بس :lol:

Link to comment
بما إني معطيه الكود صح ليه تجي ترد وتقول هذا صح ,

:shock:

كلها الاثنين صح

:!::!:

وكأنك طرحت كود جديد ,

خلاص عطيته الكود صح ليه تبي تعطيه مره ثانيه ؟

الله لا يبلانا بس :lol:

هيا طيرلك :lol:

Link to comment

ابي اعرف الخطاء هنا

    local marker = createMarker(5411,738,138, "corona", 3, 255, 0, 0, 255) 
    local move = createObject(3437, 5412,793,126, 0, 0, 0) 
    local omg1017 = createObject(3437, 5412, 793, 126, 0, 0, 0) 
     
  
     addEventHandler("onMarkerHit",marker, 
     if getElementType(player) == 'player' then 
      
     end 
     function omgMoveomg1017(point) 
        if point == 1 then 
          moveObject(omg1017, 5000, 5412, 793, 162.40542602539, 0, 0, 0) 
          setTimer(omgMoveomg1017, 5000, 1, 2) 
         elseif point == 2 then 
          moveObject(omg1017, 5000, 5413.34765625, 793, 173.93621826172, 0, 13.333312988281, 0) 
          setTimer(omgMoveomg1017, 5000, 1, 3) 
         elseif point == 3 then 
  
        end 
    end) 

Link to comment

- فنكشن الحدث جاي بعد تحقق

- الفنكشن المفروض يكون خارج الحدث, مو داخله

عالعموم صلحته لكـ :

local marker = createMarker(5411,738,138, "corona", 3, 255, 0, 0, 255) 
local move = createObject(3437, 5412,793,126, 0, 0, 0) 
local omg1017 = createObject(3437, 5412, 793, 126, 0, 0, 0) 
local points = { } 
  
function omgMoveomg1017( point ) 
    if point == 1 then 
        moveObject( omg1017, 5000, 5412, 793, 162.40542602539, 0, 0, 0 ) 
        setTimer( omgMoveomg1017, 5000, 1, 2 ) 
    elseif point == 2 then 
        moveObject( omg1017, 5000, 5413.34765625, 793, 173.93621826172, 0, 13.333312988281, 0 ) 
        setTimer( omgMoveomg1017, 5000, 1, 3 ) 
    elseif point == 3 then 
        setTimer( omgMoveomg1017, 5000, 1, 1 ) 
    end 
end 
  
addEventHandler( "onMarkerHit", marker, 
    function( player ) 
        if getElementType(player) == "player" then 
            if points[player] then 
                if points[player] >= 3 then 
                    points[player] = 0 
                end 
                points[player] = points[player] + 1 
            else 
                points[player] = 1 
            end 
            omgMoveomg1017( points[player] ) 
        end 
    end 
) 

Link to comment
- فنكشن الحدث جاي بعد تحقق

- الفنكشن المفروض يكون خارج الحدث, مو داخله

عالعموم صلحته لكـ :

local marker = createMarker(5411,738,138, "corona", 3, 255, 0, 0, 255) 
local move = createObject(3437, 5412,793,126, 0, 0, 0) 
local omg1017 = createObject(3437, 5412, 793, 126, 0, 0, 0) 
local points = { } 
  
function omgMoveomg1017( point ) 
    if point == 1 then 
        moveObject( omg1017, 5000, 5412, 793, 162.40542602539, 0, 0, 0 ) 
        setTimer( omgMoveomg1017, 5000, 1, 2 ) 
    elseif point == 2 then 
        moveObject( omg1017, 5000, 5413.34765625, 793, 173.93621826172, 0, 13.333312988281, 0 ) 
        setTimer( omgMoveomg1017, 5000, 1, 3 ) 
    elseif point == 3 then 
        setTimer( omgMoveomg1017, 5000, 1, 1 ) 
    end 
end 
  
addEventHandler( "onMarkerHit", marker, 
    function( player ) 
        if getElementType(player) == "player" then 
            if points[player] then 
                if points[player] >= 3 then 
                    points[player] = 0 
                end 
                points[player] = points[player] + 1 
            else 
                points[player] = 1 
            end 
            omgMoveomg1017( points[player] ) 
        end 
    end 
) 

الله يعطيك الف عافيه

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