Jumper_Mych Posted January 20, 2011 Share Posted January 20, 2011 Problem gui have ERROR GUIEditor_Label = {} GUIEditor_Progress = {} function Progress () GUIEditor_Label[1] = guiCreateLabel(6,662,150,20,"0",false) GUIEditor_Label[2] = guiCreateLabel(5,736,150,20,"1",false) GUIEditor_Label[3] = guiCreateLabel(5,711,150,20,"h2",false) GUIEditor_Label[4] = guiCreateLabel(4,688,150,20,"Com3",false) GUIEditor_Progress[1] = guiCreateProgressBar(56,731,175,24,false) GUIEditor_Progress[2] = guiCreateProgressBar(56,656,175,24,false) GUIEditor_Progress[3] = guiCreateProgressBar(56,706,175,24,false) GUIEditor_Progress[4] = guiCreateProgressBar(56,681,175,24,false) guiLabelSetColor(GUIEditor_Label[1],255,135,0) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) guiSetFont(GUIEditor_Label[1],"default-bold-small") guiLabelSetColor(GUIEditor_Label[2],255,135,0) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) guiSetFont(GUIEditor_Label[2],"default-bold-small") guiLabelSetColor(GUIEditor_Label[3],255,135,0) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) guiSetFont(GUIEditor_Label[3],"default-bold-small") guiLabelSetColor(GUIEditor_Label[4],255,135,0) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) guiSetFont(GUIEditor_Label[4],"default-bold-small") guiProgressBarSetProgress(GUIEditor_Progress[1],100) guiProgressBarSetProgress(GUIEditor_Progress[2],100) guiProgressBarSetProgress(GUIEditor_Progress[3],100) guiProgressBarSetProgress(GUIEditor_Progress[4],100) end addCommandHandler ( "life", Progress ) [13:53:23] ERROR: Life\Progress.lua:6: attempt to call global 'guiCreateLabel' (a nil value) How create bindkey press R can open GUI, again press R to close gui Link to comment
Kayl Posted January 20, 2011 Share Posted January 20, 2011 <script src="..." type="client" /> Link to comment
proracer Posted January 20, 2011 Share Posted January 20, 2011 Use this: https://wiki.multitheftauto.com/wiki/GuiSetVisible https://wiki.multitheftauto.com/wiki/BindKey But I think you should create a window and all those elements should be parent with the window. Then using 'guiSetVisible' you will disable window with all child elements. Link to comment
Jumper_Mych Posted January 20, 2011 Author Share Posted January 20, 2011 Kayl and proracer Thanks you! Link to comment
Jumper_Mych Posted January 20, 2011 Author Share Posted January 20, 2011 I have a question, Progress has 0% go to Marker and type /heal give you 1% for 10 sec. how ready 100% this 1 min for 1% at minus (99%). 0% this kill Marker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) 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