Jump to content

Some Helpi in Team Select with Bind Key


Evil-Cod3r

Recommended Posts

Posted

Hi all i want To Make this he get the Team 1 and 2 and Spectator and set the Player to the Team he got

see

  
GUIEditor_Window = {} 
GUIEditor_Label = {} 
  
GUIEditor_Window[1] = guiCreateWindow(441,476,532,103,"A/D Team Select",false) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
A3 = guiCreateButton(15,29,148,30,"Spectator",false,GUIEditor_Window[1]) 
guiSetFont(A3,"clear-normal") 
A2 = guiCreateButton(185,28,151,31,"Team 1",false,GUIEditor_Window[1]) 
guiSetFont(A2,"clear-normal") 
A3 = guiCreateButton(351,28,156,32,"Team 2",false,GUIEditor_Window[1]) 
guiSetFont(A3,"clear-normal") 
GUIEditor_Label[1] = guiCreateLabel(7,77,171,21,"Select Your Team !",false,GUIEditor_Window[1]) 
guiLabelSetColor(GUIEditor_Label[1],0,255,0) 
guiSetFont(GUIEditor_Label[1],"clear-normal") 
GUIEditor_Label[2] = guiCreateLabel(429,76,92,20,"Version 1.0",false,GUIEditor_Window[1]) 
guiLabelSetColor(GUIEditor_Label[2],0,0,255) 
guiSetFont(GUIEditor_Label[2],"clear-normal") 
GUIEditor_Label[3] = guiCreateLabel(210,77,104,15,"Evil-Cod3r",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Label[3],"clear-normal") 
  

Posted

Trigger a server side event and use this function :

function setTeam(player) 
          setPlayerTeam(player, getTeamFromName("Team1")) 
end 

Posted

If you want the functions, then here:

triggerServerEvent 
setPlayerTeam 
getTeamFromName 
OnClientGUIClick 

And I gave you the function in my first post -.-

Posted
          setPlayerTeam(player, getTeamFromName("Xeno 1")) 
          setPlayerTeam(player, getTeamFromName("Xeno 2")) 
  

But these are server sided events, so you going to need a trigger in your client script.

EDIT: TAPL beat me too it D:

Posted
iam using BaseMode GameMode what if the Name of team 1 and team 2 is Xeno 1 and Xeno 2 what Function i use for set the team as it found :)

He meant's what happens if the team names aren't the one expecified on the script, I think you can change team names in Basemode.

Posted (edited)

then he have to use this

for i,team in ipairs(getElementsByType("team")) do 

this Example will output in chat all teams name

for i,team in ipairs(getElementsByType("team")) do 
outputChatBox(getTeamName(team)) 
end 

Edited by Guest
Posted
then he have to use this
for i,team in ipairs(getElementsByType("team")) do 

what this do and read my post up :D

this will get all teams in the Server

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