franku Posted February 18, 2015 Share Posted February 18, 2015 (edited) Thanks, JR10 Edited February 18, 2015 by Guest Link to comment
JR10 Posted February 18, 2015 Share Posted February 18, 2015 Your code checks if the teams exist, but does not check which one the player is in. You need getPlayerTeam for that. addEventHandler( "onPlayerWasted", getRootElement( ), function( ) local team = getPlayerTeam(source) local ballassT = getTeamFromName("The Ballas") local groT = getTeamFromName("Grove Street Families") if (team == groT) then spawnPlayer (source, 3190.1435546875, -1885.5627441406, 24.918750762939) setPlayerSkin (source, 106 ) giveWeapon(source, 31, 1000) giveWeapon(source, 34, 1000) giveWeapon(source, 17, 1000) giveWeapon(source, 24, 1000) elseif (team == ballassT) then spawnPlayer (source, 3217.451171875, -1917.2902832031, 30.864063262939) setPlayerSkin ( source, 104 ) giveWeapon(source, 31, 1000) giveWeapon(source, 34, 1000) giveWeapon(source, 17, 1000) giveWeapon(source, 24, 1000) end end) Another way would be to use getTeamName(getPlayerTeam(source)) == "The Ballas" Link to comment
franku Posted February 18, 2015 Author Share Posted February 18, 2015 Ok thanks a lot. 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