Jump to content

مـشـكـلـتـيـن


Recommended Posts

vTable = { 
   [ 1 ] = { -2695.6999511719, -185.30000305176, 3.3000001907349 }, 
   [ 2 ] = { -2717, -95.5, 3.3000001907349 }, 
   [ 3 ] = { -2716.8999023438, -54.799999237061, 3.3000001907349 }, 
   [ 4 ] = { -2717.1999511719, 1.7999999523163, 3.3000001907349 }, 
   [ 5 ] = { -2696.1000976563, 59.799999237061, 3.3000001907349 }, 
   [ 6 ] = { -2695.8000488281, 77.800003051758, 3.3000001907349 }, 
   [ 7 ] = { -2694.5, 118.80000305176, 3.3000001907349 }, 
} 
  
local one = createMarker ( -2622.6, 131.599, 7, "cylinder", 1.5, 255, 255, 0, 170 ) 
addEventHandler('onClientMarkerHit',one, 
function moneys( hitPlayer ) 
    if hitPlayer == localPlayer then 
        local x,y,z = getElementPosition ( source ) 
            local px,py,pz = getElementPosition ( hitPlayer ) 
                if z and pz then 
                    local check = math.abs ( pz - z ) 
                    if 1 >= check then 
                    triggerLatentServerEvent ( "money",hitPlayer ) 
                    local PosX,PosY,PosZ = unpack( vTable [ math.random( #vTable ) ] ) 
                    setElementPosition (one, PosX, PosY, PosZ)   
                end 
            end 
        end 
    end,false 
) 
Link to comment

اتوقع الخطأ من اسم الفنكشن , جرب كذا,

vTable = { 
   [ 1 ] = { -2695.6999511719, -185.30000305176, 3.3000001907349 }, 
   [ 2 ] = { -2717, -95.5, 3.3000001907349 }, 
   [ 3 ] = { -2716.8999023438, -54.799999237061, 3.3000001907349 }, 
   [ 4 ] = { -2717.1999511719, 1.7999999523163, 3.3000001907349 }, 
   [ 5 ] = { -2696.1000976563, 59.799999237061, 3.3000001907349 }, 
   [ 6 ] = { -2695.8000488281, 77.800003051758, 3.3000001907349 }, 
   [ 7 ] = { -2694.5, 118.80000305176, 3.3000001907349 }, 
} 
  
local one = createMarker ( -2622.6, 131.599, 7, "cylinder", 1.5, 255, 255, 0, 170 ) 
addEventHandler('onClientMarkerHit',one, 
function( hitPlayer ) 
    if hitPlayer == localPlayer then 
        local x,y,z = getElementPosition ( source ) 
            local px,py,pz = getElementPosition ( hitPlayer ) 
                if z and pz then 
                    local check = math.abs ( pz - z ) 
                    if 1 >= check then 
                    triggerLatentServerEvent ( "money",hitPlayer ) 
                    local PosX,PosY,PosZ = unpack( vTable [ math.random( #vTable ) ] ) 
                    setElementPosition (one, PosX, PosY, PosZ)   
                end 
            end 
        end 
    end,false 
) 
Link to comment

جرب كذا ذذ,

vTable = { 
   [ 1 ] = { -2695.6999511719, -185.30000305176, 3.3000001907349 }, 
   [ 2 ] = { -2717, -95.5, 3.3000001907349 }, 
   [ 3 ] = { -2716.8999023438, -54.799999237061, 3.3000001907349 }, 
   [ 4 ] = { -2717.1999511719, 1.7999999523163, 3.3000001907349 }, 
   [ 5 ] = { -2696.1000976563, 59.799999237061, 3.3000001907349 }, 
   [ 6 ] = { -2695.8000488281, 77.800003051758, 3.3000001907349 }, 
   [ 7 ] = { -2694.5, 118.80000305176, 3.3000001907349 }, 
} 
  
local PosX,PosY,PosZ = unpack( vTable [ math.random( #vTable ) ] ) 
local one = createMarker ( PosX,PosY,PosZ, "cylinder", 1.5, 255, 255, 0, 170 ) 
addEventHandler('onClientMarkerHit',one, 
function( hitPlayer ) 
    if hitPlayer == localPlayer then 
        local x,y,z = getElementPosition ( source ) 
            local px,py,pz = getElementPosition ( hitPlayer ) 
                if z and pz then 
                    local check = math.abs ( pz - z ) 
                    if 1 >= check then 
                    triggerLatentServerEvent ( "money",hitPlayer ) 
                end 
            end 
        end 
    end,false 
) 
Link to comment
جرب كذا ذذ,

vTable = { 
   [ 1 ] = { -2695.6999511719, -185.30000305176, 3.3000001907349 }, 
   [ 2 ] = { -2717, -95.5, 3.3000001907349 }, 
   [ 3 ] = { -2716.8999023438, -54.799999237061, 3.3000001907349 }, 
   [ 4 ] = { -2717.1999511719, 1.7999999523163, 3.3000001907349 }, 
   [ 5 ] = { -2696.1000976563, 59.799999237061, 3.3000001907349 }, 
   [ 6 ] = { -2695.8000488281, 77.800003051758, 3.3000001907349 }, 
   [ 7 ] = { -2694.5, 118.80000305176, 3.3000001907349 }, 
} 
  
local PosX,PosY,PosZ = unpack( vTable [ math.random( #vTable ) ] ) 
local one = createMarker ( PosX,PosY,PosZ, "cylinder", 1.5, 255, 255, 0, 170 ) 
addEventHandler('onClientMarkerHit',one, 
function( hitPlayer ) 
    if hitPlayer == localPlayer then 
        local x,y,z = getElementPosition ( source ) 
            local px,py,pz = getElementPosition ( hitPlayer ) 
                if z and pz then 
                    local check = math.abs ( pz - z ) 
                    if 1 >= check then 
                    triggerLatentServerEvent ( "money",hitPlayer ) 
                end 
            end 
        end 
    end,false 
) 

وين

setElementPosition 

جربت حطيتها كذا وماضبطت

setElementPosition (one, PosX, PosY, PosZ)   

Link to comment

انا هذا الفنكشن ما فهمته ذذ,

بس استخدم

triggerServerEvent 

+ الحين اول تقول تبي الماركر يكون بمكان عشوائي والحين تبي اذا لمسته ؟

ارجع للرد حقي ورا وبتقلى الكود ذذ

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