Jump to content

How to create a spawn on a Team Button?


Jaysds1

Recommended Posts

--client side

function selectTeam() 
triggerServerEvent("setTeam",getLocalPlayer()) 
end 
addEventHandler("onClientGUIClick",yourButtonElement,selectTeam,false) 
  

--server side

addEvent("setTeam",true) 
addEventHandler("setTeam",getRootElement(), 
function () 
setPlayerTeam" class="kw6">setPlayerTeam(source,getTeamFromName("Some_Team")) 
outputChatBox("Your team has been set!", source) 
end) 

Link to comment
  • 1 month later...

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...