elchinooo98 Posted January 23, 2016 Posted January 23, 2016 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
Enargy, Posted January 24, 2016 Posted January 24, 2016 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)
Castillo Posted January 24, 2016 Posted January 24, 2016 Eso solo funcionara si la "gang" es "SWAT". if ( myself == otherguy ) then Con eso te funcionara para todas las gangs.
Tomas Posted January 24, 2016 Posted January 24, 2016 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
Recommended Posts