Mixters Posted October 11, 2012 Share Posted October 11, 2012 (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 October 12, 2012 by Guest Link to comment
Castillo Posted October 11, 2012 Share Posted October 11, 2012 Te las quite o te cambie de slot a 0? Link to comment
Mixters Posted October 12, 2012 Author Share Posted October 12, 2012 Te las quite o te cambie de slot a 0? que cambie los slot a 0 Link to comment
Castillo Posted October 12, 2012 Share Posted October 12, 2012 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
Mixters Posted October 12, 2012 Author Share Posted October 12, 2012 (edited) Proba eso. ok, Gracias!. ya mismo lo pruebo Edited October 12, 2012 by Guest Link to comment
Mixters Posted October 12, 2012 Author Share Posted October 12, 2012 lo he probado pero al parecer solo me cambia el arma, si cambio con ''q'' y ''e'' la puedo volver a poner Link to comment
Mixters Posted October 12, 2012 Author Share Posted October 12, 2012 Te las quite o te cambie de slot a 0? creo que seria mejor que las quite, ya que cambiando los slot no funciono Link to comment
NodZen Posted October 12, 2012 Share Posted October 12, 2012 (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 October 12, 2012 by Guest Link to comment
Mixters Posted October 12, 2012 Author Share Posted October 12, 2012 gracias, próbare Link to comment
Mixters Posted October 12, 2012 Author Share Posted October 12, 2012 tengo problemas con el orden, Podrias ayudarme ? Link to comment
Castillo Posted October 12, 2012 Share Posted October 12, 2012 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
Mixters Posted October 12, 2012 Author Share Posted October 12, 2012 MUCHISIMAS GRACIAS SOLID ! Link to comment
Castillo Posted October 12, 2012 Share Posted October 12, 2012 MUCHISIMAS GRACIAS SOLID ! De nada. @NOD: No tiene sentido mencionar esa funcion, el que disparo el arma es el cliente. Link to comment
NodZen Posted October 12, 2012 Share Posted October 12, 2012 Bueno yo le dije por si usa zombies o slothBots. Link to comment
Castillo Posted October 12, 2012 Share Posted October 12, 2012 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. Link to comment
Recommended Posts