A3kri Posted July 31, 2012 Share Posted July 31, 2012 Hello, how to make a gui window with some nametags inside and when the player choose one and press select the name tag appears on his head like Nametags v1 - the hero - the cop - the punisher - the lover etc .. [select] when he chooses one then press select it appears on his head and the gui window appears everything he logs in like the login panel Link to comment
Callum Posted July 31, 2012 Share Posted July 31, 2012 I would recommend using DirectX functions, rather than CEGUI. It's a lot smoother, for dynamic stuff such as nametags. Link to comment
Castillo Posted July 31, 2012 Share Posted July 31, 2012 You'll need a combination of GUI and DX functions, GUI to create the interface to select nametag, and DX to draw the nametag itself. https://wiki.multitheftauto.com/wiki/Cli ... _functions dxDrawImage dxDrawText Link to comment
A3kri Posted July 31, 2012 Author Share Posted July 31, 2012 I would recommend using DirectX functions, rather than CEGUI. It's a lot smoother, for dynamic stuff such as nametags. thanks man , ill try =) You'll need a combination of GUI and DX functions, GUI to create the interface to select nametag, and DX to draw the nametag itself.https://wiki.multitheftauto.com/wiki/Cli ... _functions dxDrawImage dxDrawText that's what I heard, I'll try to do that .. thanks =) --- EDIT after I made the gui .. in the grid list what do I make a text ? or buttons .. and after I made them .. using the DX how do I let the option the user chose will be on his head ? Link to comment
Scooby Posted July 31, 2012 Share Posted July 31, 2012 all u need is ur gui with 1 gridlist containing ur text to show above the player and the select button, when u click select, get the selected info from the gridlist and store it to a table for that player. in ur dx function all u need is to check if the player has any stored data in the table, if so.. draw it. post back if u need more help. Link to comment
A3kri Posted July 31, 2012 Author Share Posted July 31, 2012 Thanks, is there any gui maker ? like an app for making gui for mta ? Link to comment
Castillo Posted July 31, 2012 Share Posted July 31, 2012 Yes, there's a ingame GUI designer: https://community.multitheftauto.com/ind ... ils&id=141 Link to comment
Jaysds1 Posted July 31, 2012 Share Posted July 31, 2012 and here: viewtopic.php?f=91&t=31891 Link to comment
A3kri Posted August 1, 2012 Author Share Posted August 1, 2012 thanks guys .. I've done it using the guieditor in the community main page .. this what I made addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(518,226,192,295,"Name tags",false) GUIEditor_Grid[1] = guiCreateGridList(9,29,174,226,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Tags",0.2) for i = 1, 2 do guiGridListAddRow(GUIEditor_Grid[1]) end guiGridListSetItemText(GUIEditor_Grid[1],0,1,"Love") guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Hate") GUIEditor_Button[1] = guiCreateButton(12,261,171,25,"Select",false,GUIEditor_Window[1]) end ) now how do I make when the player chooses the name tag he wants it set on his head ? Link to comment
top sniper Posted August 1, 2012 Share Posted August 1, 2012 thanks guys .. I've done it using the guieditor in the community main page .. this what I made addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(518,226,192,295,"Name tags",false) GUIEditor_Grid[1] = guiCreateGridList(9,29,174,226,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Tags",0.2) for i = 1, 2 do guiGridListAddRow(GUIEditor_Grid[1]) end guiGridListSetItemText(GUIEditor_Grid[1],0,1,"Love") guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Hate") GUIEditor_Button[1] = guiCreateButton(12,261,171,25,"Select",false,GUIEditor_Window[1]) end ) now how do I make when the player chooses the name tag he wants it set on his head ? https://wiki.multitheftauto.com/wiki/OnClientGUIClick https://wiki.multitheftauto.com/wiki/DxDrawText https://wiki.multitheftauto.com/wiki/Gui ... lectedItem Link to comment
A3kri Posted August 1, 2012 Author Share Posted August 1, 2012 thanks =) ... and can you give me some explanation of the links u gave me ? cuz I'm kinda new, and I don't really understand the wiki or how to use it properly and what functions and methods do I use ? 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