Jump to content

Spawn 50p no funciona el noteamkill


Anthrax

Recommended Posts

Hola a todos tengo un problema con el noteamkill ._.

Descargue el Spawn 50p

https://community.multitheftauto.com/in ... ls&id=6429

y edite el spawn_locations.map de ese script en friendlyfire="false" y nada no funciona el noteamkill

tambien probe con scripts como estos y nada ( no dan error), solo funcionan cuando reinicio el recurso :(

function protect() 
       SetTimer(function() 
                for i, TEAMS in ipairs ( getElementsByType("team") ) do 
            if ( getTeamFriendlyFire ( TEAMS ) == true ) then 
                setTeamFriendlyFire ( TEAMS, false ) 
end          
end  
            end,1000,1) 
protect() 
end 

for _,t in ipairs(getElementsByType("team")) do 
      setTeamFriendlyFire ( t , false ) 
end 

function protect() 
for i, TEAMS in ipairs ( getElementsByType("team") ) do 
if ( getTeamFriendlyFire ( TEAMS ) == true ) then 
setTeamFriendlyFire ( TEAMS, false ) 
end 
end 
end 
addEventHandler("onResourceStart", resourceRoot, protect) 

Ayudenme porfavor D:

saludos

Link to comment

Prueva con esto aver si te sirve

addEventHandler ("onClientPlayerDamage",root, 
        function ( attacker ) 
                if ( attacker and getElementType ( attacker ) == "player" ) then 
                        if ( attacker ~= source ) then 
                                local attackerTeam = getPlayerTeam ( attacker ) 
                                local sourceTeam = getPlayerTeam ( source ) 
                                if ( attackerTeam == sourceTeam ) then 
                                        cancelEvent () 
                                end 
                         end 
                end 
        end 
) 
  

Link to comment
Prueva con esto aver si te sirve
addEventHandler ("onClientPlayerDamage",root, 
        function ( attacker ) 
                if ( attacker and getElementType ( attacker ) == "player" ) then 
                        if ( attacker ~= source ) then 
                                local attackerTeam = getPlayerTeam ( attacker ) 
                                local sourceTeam = getPlayerTeam ( source ) 
                                if ( attackerTeam == sourceTeam ) then 
                                        cancelEvent () 
                                end 
                         end 
                end 
        end 
) 
  

Funciono al 100%

Yo ya me estaba loqueando por que no me salia xD

Tambien añadi para que no se pueda matar con cuchillo

addEventHandler("onClientPlayerStealthKill", getRootElement(), function(targetPlayer) 
   cancelEvent() 
end) 

Gracias!!! facebook-like-icon.png

Link to comment
El problema del script inicial que pusiste era que el timer solo se iniciaba al iniciar el recurso, en cambio, deberias ponerlo para que se ejecutara cuando el jugador entra al servidor

Si tambien lo puse con OnPlayerJoin y no funcionaba

Link to comment
  • Recently Browsing   0 members

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