Jump to content

السلاح الذي مع اللاعب


Recommended Posts

o.O

خخخ onClientColShapeHit حسبتها

addEventHandler( "onClientElementColShapeHit", CHT2, 
    function( ) 
        if getElementType( source ) == "vehicle" then 
            local thePlayer = getVehicleOccupant( source, 0 ) 
            if not thePlayer then return end 
            setElementFrozen( source,true ) 
            local weaponType = getPedWeapon( thePlayer ) 
            local totalAmmo = getPedTotalAmmo( thePlayer ) 
            if weaponType == 3 and totalAmmo > 0 then 
                setElementFrozen( source, false ) 
            end 
        end 
    end 
) 

أخوي انت حاط اسم الكول بالحدث .. والمصدر بالحدث هو العنصر الي يدخل الكول، يعني بهالحالة ذي انت حددت اسم متغير العنصر الي يدخل الكول

المهم يصير كودكـ كذا ..

-- Client Side # 
addEventHandler( "onClientElementColShapeHit", root, 
    function( theCol ) 
        if theCol == CHT2 and getElementType( source ) == "vehicle" then 
            local thePlayer = getVehicleOccupant( source, 0 ) 
            if not thePlayer then return end 
            setElementFrozen( source, true ) 
            local weaponType = getPedWeapon( thePlayer ) 
            local totalAmmo = getPedTotalAmmo( thePlayer ) 
            if weaponType == 3 and totalAmmo > 0 then 
                setElementFrozen( source, false ) 
            end 
        end 
    end 
) 

Link to comment
o.O

خخخ onClientColShapeHit حسبتها

addEventHandler( "onClientElementColShapeHit", CHT2, 
    function( ) 
        if getElementType( source ) == "vehicle" then 
            local thePlayer = getVehicleOccupant( source, 0 ) 
            if not thePlayer then return end 
            setElementFrozen( source,true ) 
            local weaponType = getPedWeapon( thePlayer ) 
            local totalAmmo = getPedTotalAmmo( thePlayer ) 
            if weaponType == 3 and totalAmmo > 0 then 
                setElementFrozen( source, false ) 
            end 
        end 
    end 
) 

أخوي انت حاط اسم الكول بالحدث .. والمصدر بالحدث هو العنصر الي يدخل الكول، يعني بهالحالة ذي انت حددت اسم متغير العنصر الي يدخل الكول

المهم يصير كودكـ كذا ..

-- Client Side # 
addEventHandler( "onClientElementColShapeHit", root, 
    function( theCol ) 
        if theCol == CHT2 and getElementType( source ) == "vehicle" then 
            local thePlayer = getVehicleOccupant( source, 0 ) 
            if not thePlayer then return end 
            setElementFrozen( source, true ) 
            local weaponType = getPedWeapon( thePlayer ) 
            local totalAmmo = getPedTotalAmmo( thePlayer ) 
            if weaponType == 3 and totalAmmo > 0 then 
                setElementFrozen( source, false ) 
            end 
        end 
    end 
) 

×.×

:mrgreen: مدري وشبه ذا الكود مضارب معاي

:wink: مشكوور عالتعديل ,,

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