Jump to content

team spawn points


5150

Recommended Posts

how can i make a spawn point that only a certain team will go to? i want my americans team to spawn in certain locations, and my germans team to spawn in other locations

Try this:

function spawn (player) 
local players = getPlayerTeam(player) 
if players and getTeamFromName("Americans") == players then 
spawnPlayer (source, x, y, z, rotation, skin, interior, dimension) -- Americans spawn 
else 
spawnPlayer (source, x, y, z, rotation, skin, interior, dimension) -- other spawn 
end 
end 
addEventHandler("onPlayerWasted", getRootElement(), spawn) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...