Anthrax Posted May 28, 2014 Share Posted May 28, 2014 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
alex17 Posted May 28, 2014 Share Posted May 28, 2014 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
Anthrax Posted May 29, 2014 Author Share Posted May 29, 2014 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 Tambien añadi para que no se pueda matar con cuchillo addEventHandler("onClientPlayerStealthKill", getRootElement(), function(targetPlayer) cancelEvent() end) Gracias!!! Link to comment
UserToDelete Posted May 30, 2014 Share Posted May 30, 2014 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 Link to comment
Anthrax Posted May 30, 2014 Author Share Posted May 30, 2014 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
Recommended Posts