Jump to content

[ayuda] weapon slot


Mixters

Recommended Posts

addEventHandler ( "onClientPlayerWeaponFire", localPlayer, 
    function ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) 
        if ( hitElement and getElementType ( hitElement ) == "player" ) then 
            setPedWeaponSlot ( localPlayer, 0 ) 
        end 
    end 
) 

Proba eso.

Link to comment
Bueno pues para que quite todas las armas tienes que usar
getElementData --Para saber quien le disparo entonces alli quitas el arma 
takeAllWeapons --para quitar las armas 

getElementData? es un chiste supongo.

-- client side:

addEventHandler ( "onClientPlayerWeaponFire", localPlayer, 
    function ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) 
        if ( hitElement and getElementType ( hitElement ) == "player" ) then 
            triggerServerEvent ( "takeWeapons", localPlayer ) 
        end 
    end 
) 

-- server side:

addEvent ( "takeWeapons", true ) 
addEventHandler ( "takeWeapons", root, 
    function ( ) 
        takeAllWeapons ( source ) 
    end 
) 

Link to comment
  • Recently Browsing   0 members

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