Jump to content

[ayuda] weapon slot


Mixters

Recommended Posts

Posted (edited)

Hola, quiero saber si me podrían ayudar con algo simple.

que podría usar para que al disparar a un jugador te quite las armas

¿ayudan?. gracias.. :)

Edited by Guest

Scripter: 5% / 100%

En Conocimientos.

Posted

Te las quite o te cambie de slot a 0?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

lo he probado pero al parecer solo me cambia el arma, si cambio con ''q'' y ''e'' la puedo volver a poner :(

Scripter: 5% / 100%

En Conocimientos.

Posted
Te las quite o te cambie de slot a 0?

creo que seria mejor que las quite, ya que cambiando los slot no funciono

Scripter: 5% / 100%

En Conocimientos.

Posted (edited)

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 

Edited by Guest

------------------------------------------------------------------------------------------

My scripts

http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977

http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740

Posted
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 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
MUCHISIMAS GRACIAS SOLID :D !

De nada.

@NOD: No tiene sentido mencionar esa funcion, el que disparo el arma es el cliente.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Talvez no le entendiste, porque lo que el queria es que cuando un jugador le dispara a otro, le quite el arma al que disparo.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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