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) 

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 

  • Recently Browsing   0 members

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