Jump to content

طلب فنكشاااااااااات


EH10

Recommended Posts

وش الـخـطأ *

addEventHandler("onPlayerTarget",root,function() 
    bindKey (source,"j","down", 
end 
  
 function() 
               local rx,ry,rz,ax,ay,az,px,py,pz = getElementPosition(source) 
               if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 4 then 
               local wep = getPedWeapon(.....) 
               if ( wep ) then 
               nammo = getPedTotalAmmo(.....) 
               takeWeapon(.....) 
               giveWeapon(.....) 
                end 
             end 
           end 
  ) 

Link to comment

جرب ,

addEventHandler ( "onPlayerTarget", root, function ( targetElem ) 
bindKey (source,"j","down", 
function( ) 
    local rx,ry,rz = getElementPosition(source) 
        local ax,ay,az = getElementPosition(targetElem) 
            if targetElem and getElementType ( targetElem ) == "player" and getDistanceBetweenPoints3D(rx,ry,rz,ax,ay,az) <= 4 then 
            local wep = getPedWeapon( targetElem ) 
                if ( wep ) then 
                nammo = getPedTotalAmmo( targetElem ) 
                    takeWeapon( targetElem, wep, nammo ) 
                        giveWeapon( source, wep, nammo) 
                    end 
                end 
            end 
        ) 
    end 
) 

Link to comment
جرب ,
addEventHandler ( "onPlayerTarget", root, function ( targetElem ) 
bindKey (source,"j","down", 
function( ) 
    local rx,ry,rz = getElementPosition(source) 
        local ax,ay,az = getElementPosition(targetElem) 
            if targetElem and getElementType ( targetElem ) == "player" and getDistanceBetweenPoints3D(rx,ry,rz,ax,ay,az) <= 4 then 
            local wep = getPedWeapon( targetElem ) 
                if ( wep ) then 
                nammo = getPedTotalAmmo( targetElem ) 
                    takeWeapon( targetElem, wep, nammo ) 
                        giveWeapon( source, wep, nammo) 
                    end 
                end 
            end 
        ) 
    end 
) 

يعطيك العافية

ان اشتغل او ماشتغل الله يوفقك دنيا واخره على المساعده امين

Link to comment
جرب ,
addEventHandler ( "onPlayerTarget", root, function ( targetElem ) 
bindKey (source,"j","down", 
function( ) 
    local rx,ry,rz = getElementPosition(source) 
        local ax,ay,az = getElementPosition(targetElem) 
            if targetElem and getElementType ( targetElem ) == "player" and getDistanceBetweenPoints3D(rx,ry,rz,ax,ay,az) <= 4 then 
            local wep = getPedWeapon( targetElem ) 
                if ( wep ) then 
                nammo = getPedTotalAmmo( targetElem ) 
                    takeWeapon( targetElem, wep, nammo ) 
                        giveWeapon( source, wep, nammo) 
                    end 
                end 
            end 
        ) 
    end 
) 

يعطيك العافية

ان اشتغل او ماشتغل الله يوفقك دنيا واخره على المساعده امين

تسلم حبيبي :mrgreen:

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