Jaysds1 Posted March 17, 2011 Posted March 17, 2011 I need help creating a button linking to a team, making a person/client spawn on that team.
Castillo Posted March 17, 2011 Posted March 17, 2011 --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)
Jaysds1 Posted April 29, 2011 Author Posted April 29, 2011 How do you connect this to the spawn window with the 2 buttons
Castillo Posted April 30, 2011 Posted April 30, 2011 yourButtonElement = guiCreateButton(blabla) You will have something else, that's why i put yourButtonElement for you to change it.
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