Evil-Cod3r Posted December 20, 2011 Share Posted December 20, 2011 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") Link to comment
Castillo Posted December 20, 2011 Share Posted December 20, 2011 You want to set the player team according to which button he press? Link to comment
Xeno Posted December 20, 2011 Share Posted December 20, 2011 Trigger a server side event and use this function : function setTeam(player) setPlayerTeam(player, getTeamFromName("Team1")) end Link to comment
Evil-Cod3r Posted December 20, 2011 Author Share Posted December 20, 2011 no Xeno i want as SoldSnake14 Say Link to comment
Xeno Posted December 20, 2011 Share Posted December 20, 2011 -.- You mean you want Solidsnake to do it FOR you? Link to comment
Castillo Posted December 20, 2011 Share Posted December 20, 2011 That's not going to happen, I'm not going to give you the script completed. Link to comment
Evil-Cod3r Posted December 21, 2011 Author Share Posted December 21, 2011 no i want he give me the function so i can start Link to comment
Xeno Posted December 21, 2011 Share Posted December 21, 2011 If you want the functions, then here: triggerServerEvent setPlayerTeam getTeamFromName OnClientGUIClick And I gave you the function in my first post -.- Link to comment
Evil-Cod3r Posted December 21, 2011 Author Share Posted December 21, 2011 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 Link to comment
TAPL Posted December 21, 2011 Share Posted December 21, 2011 ^^ local team1 = getTeamFromName("Xeno 1") local team2 = getTeamFromName("Xeno 2") Link to comment
Xeno Posted December 21, 2011 Share Posted December 21, 2011 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: Link to comment
Castillo Posted December 21, 2011 Share Posted December 21, 2011 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. Link to comment
Evil-Cod3r Posted December 21, 2011 Author Share Posted December 21, 2011 should i use getTeamName() then guisetTexe = The Button? Link to comment
TAPL Posted December 21, 2011 Share Posted December 21, 2011 (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 December 21, 2011 by Guest Link to comment
Evil-Cod3r Posted December 21, 2011 Author Share Posted December 21, 2011 then he have to use this for i,team in ipairs(getElementsByType("team")) do what this do and read my post up Link to comment
TAPL Posted December 21, 2011 Share Posted December 21, 2011 then he have to use this for i,team in ipairs(getElementsByType("team")) do what this do and read my post up this will get all teams in the Server Link to comment
Xeno Posted December 21, 2011 Share Posted December 21, 2011 Why don't you just make it so in the gui buttons you change the there? Link to comment
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