ghassen14 Posted October 25, 2015 Posted October 25, 2015 Hello Guys i need team code which means every team spawn in his spawn like Contre strike exemple : group1 spawn ( X , Y , Z) group2 spawn ( X , Y , Z)
1LoL1 Posted October 25, 2015 Posted October 25, 2015 function team (source) local team1 = getPlayerTeam(source) local team2 = getTeamName(team1) if (team2 == "TEAM") then setElementPosition(source, x,y,z) -- if player is in team "TEAM" --> he will spawned on x,y,z elseif (team2 == "TEAM2") then setElementPosition(source, x,y,z) -- if player is in team "TEAM2" --> he will spawned on x,y,z else setElementPosition(source, x,y,z) -- if player is not in team --> he will spawned on next x,y,z end end addEventHandler("onPlayerWasted", getRootElement(), team) or function team (source) local team1 = getPlayerTeam(source) local team2 = getTeamName(team1) if (team2 == "TEAM") then setElementPosition(source, x,y,z) -- if player is in team "TEAM" --> he will spawned on x,y,z else setElementPosition(source, x,y,z) -- if player is not in team --> he will spawned on next x,y,z end end addEventHandler("onPlayerWasted", getRootElement(), team)
KariiiM Posted October 26, 2015 Posted October 26, 2015 source defined it self no need to add an argument on the function
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