huyjvguyen Posted July 29, 2015 Share Posted July 29, 2015 function openvipshop() if isElement(vipshop) then desroyElement(vipshop) else x,y= guiGetScreenSize() vipshop = guiCreateWindow(0, 0, x-500, y-500, "Shop Vip", true ) guiWindowSetMovable ( vipshop, true ) button.changename = guiCreateButton(0.8, 0.8, 100, 200, "Change Name", true, vipshop ) showCursor(true) function onClickButton() triggerClientEvent("Changenamec",getElementRoot(),button.changename) showCursor(true) destroyElement(vipshop) end end addEventHandler("onClientGUIClick", button.changename, onClickButton ) end bindKey ("F9", "down", openvipshop) Link to comment
huyjvguyen Posted July 29, 2015 Author Share Posted July 29, 2015 i click button change name but the triggerClientEvent is not trigger next client Event! Link to comment
GTX Posted July 29, 2015 Share Posted July 29, 2015 triggerClientEvent can be used server side. You're using it in client. Either use triggerEvent or triggerServerEvent in case if you want it to send to server side. 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