Jump to content

No Damage entre Miembros de Gang


elchinooo98

Recommended Posts

Posted

Hola tengo un sistema de grupos (no se bien de quien es) que usa como setElementData "gang" (igual que el de castillo creo) y quiero hacer un script para que no se puedan hacer daño ni matar los miembros de esa gang que funciones deberia usar y como detecto la gang? desde ya gracias :D

Posted

Trata de usar esto, no lo he probado.

addEventHandler ( "onClientPlayerDamage", getRootElement(), 
function( attacker, weapon, bodypart, loss ) 
    local myself = getElementData(localPlayer, "gang") 
    local otherguy = getElementData(attacker, "gang") 
    if myself == "SWAT" and otherguy == "SWAT" then 
        cancelEvent() 
    end 
end) 

Inactivo.

Posted

Eso solo funcionara si la "gang" es "SWAT".

if ( myself == otherguy ) then 

Con eso te funcionara para todas las gangs.

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
Eso solo funcionara si la "gang" es "SWAT".
if ( myself == otherguy ) then 

Con eso te funcionara para todas las gangs.

if ( myself == otherguy and not myself == "None" ) then 

Currently developing for International Gaming Community - Join us!

  • Recently Browsing   0 members

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