Jump to content

GUI window popping up for everyone.


kewizzle

Recommended Posts

Posted

I had the problem before with another gui i made but for some reason i cant fix it with this one.

addEvent("openLevelW",true)
addEventHandler("openLevelW",root,
function (thePlayer)
	if getElementData(source, "Level") == 4 and thePlayer == getLocalPlayer() then
	guiSetVisible( unlockwindow, not guiGetVisible( unlockwindow ) )
        GUIEditor.label[1] = guiCreateLabel(34, 25, 201, 61, "-Unlocked Ability To Drive Bikes", false, unlockwindow)
		showCursor ( true )
	else if getElementData(source, "Level") == 9 and thePlayer == getLocalPlayer() then
	guiSetVisible( unlockwindow, not guiGetVisible( unlockwindow ) )
        GUIEditor.label[1] = guiCreateLabel(34, 25, 201, 61, "-Unlocked Ability To Drive Cars.\n-Unlocked Skin Shop.\n-Unlocked Chainsaw.\n-Unlocked The Kingdom.", false, unlockwindow)
		showCursor ( true )
	
				end
			end
		end)

 

Posted (edited)
addEvent("onPlayerLevelUp")
addEventHandler("onPlayerLevelUp",root,
function(level,old)
outputChatBox("You level up!",source)
playSound3DToElement(source,source,"levelUP.wav")
        triggerClientEvent("openLevelW", source, openLevelW)
    end)

 

Edited by kewizzle
Posted
1 hour ago, NeXuS™ said:

triggerClientEvent(source, "openLevelW", source, openLevelW)

 

thanks xD i always forget there is 4 arguments for triggerClientEvent

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