BadBoy Posted July 7, 2013 Share Posted July 7, 2013 where is the wrong there ? addEventHandler("onPlayerWasted",getRootElement(), function(killer) local ThwarTeam = getPlayerTeam ( killer ) if ThwarTeam then if ( getTeamName ( ThwarTeam ) == "NoTeam" ) then spawnPlayer ( source, 1971.0981445313,-2159.1594238281,13.546875, 0, 1, 0, 0, Team ) setCameraTarget ( source, source ) end end end ) Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 Lol , why you write in the function ' killer' ? and this is the 2 argument, should be ' function(_,killer) '. And you must not want this. Try, addEventHandler("onPlayerWasted",root, function() local Team = getPlayerTeam(source) if Team then if Team == getTeamFromName('NoTeam') then spawnPlayer ( source, 1971.0981445313,-2159.1594238281,13.546875, 0, 1, 0, 0) setCameraTarget ( source, source) end end end ) this code : on the player wasted check the team , if team = NoTeam then spawn the player. 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