StasekSyba Posted April 26, 2015 Share Posted April 26, 2015 Witam wszystkich.Mozecie mi poswiecic chwile czasu?mam problem z dodaniem tzw.firendlyfire.Mam serwer,ktory sie cieszy jako taka popularnoscia,ale jak to bywa zdazaja sie tacy,co zabijaja kogo i co popadnie.Chciałem dodac uniemozliwienie zabijania gracza przez innego,ale mi jakos nie wyszło.Mozecie napisac jak to powinno byc napisane?Napisałem tak: -- get a table with all teams local allTeams = getElementsByType ( "team" ) -- for every team, for index, theTeam in ipairs(allTeams) do -- if friendly fire is off, if ( getTeamFriendlyFire ( theTeam ) == false ) then -- switch it on setTeamFriendlyFire ( theTeam, true ) end end lub dałem tez tak: function setFriendlyFireOn ( ) -- For each team, for index, theTeam in ipairs ( getElementsByType("team") ) do -- if friendly fire is off, if ( getTeamFriendlyFire ( theTeam ) == false ) then -- switch it on. setTeamFriendlyFire ( theTeam, true ) end end end -- Add console command 'setFF' addCommandHandler ( "setFF", setFriendlyFireOn ) dałem to do jakiegos skryptu,zeby odpalało od razu,ale nie działa.Moze ktos napisac,jak to powinno byc?z gory THX Link to comment
WhoAmI Posted April 26, 2015 Share Posted April 26, 2015 Daj ten kod po stronie client. addEventHandler ( "onClientPlayerDamage", root, function ( ) cancelEvent ( ) end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now