huyjvguyen Posted July 29, 2015 Share Posted July 29, 2015 this is client: function openvipshop() if isElement(vipshop) then desroyElement(vipshop) else x,y= guiGetScreenSize() vipshop=createWindow(0, 0, x-100, y-100, "Shop Vip", true ) guiWindowSetMovable ( vipshop, true ) changenamecharacter=guiCreateButton(0.8, 0.8, 100, 200, "Change Name", true, vipshop ) showCursor(true) function onClickButton() triggerClientEvent("changenamec",getElementRoot(),changenamecharacter) showCursor(true) destroyElement(vipshop) end end addEventHandler("onClientGUIClick", doiten, onClickButton ) end bindKey ("F2", "down", openvipshop Link to comment
TheSmart Posted July 29, 2015 Share Posted July 29, 2015 function openvipshop() if isElement(vipshop) then desroyElement(vipshop) else x,y= guiGetScreenSize() vipshop=createWindow(0, 0, x-100, y-100, "Shop Vip", true ) guiWindowSetMovable ( vipshop, true ) changenamecharacter=guiCreateButton(0.8, 0.8, 100, 200, "Change Name", true, vipshop ) showCursor(true) function onClickButton() triggerClientEvent("changenamec",getElementRoot(),changenamecharacter) showCursor(true) destroyElement(vipshop) end end addEventHandler("onClientGUIClick", doiten, onClickButton ) end bindKey ("F2", "down", openvipshop) Link to comment
huyjvguyen Posted July 29, 2015 Author Share Posted July 29, 2015 whare your change? i don't see it?? Link to comment
TheSmart Posted July 29, 2015 Share Posted July 29, 2015 whare your change? i don't see it?? your's bindKey ("F2", "down", openvipshop and mine, you forget to put ) to close it bindKey ("F2", "down", openvipshop) Link to comment
huyjvguyen Posted July 29, 2015 Author Share Posted July 29, 2015 but it is not work, press f2 and notthing Link to comment
TheSmart Posted July 29, 2015 Share Posted July 29, 2015 i believe there is more error anyway try now function openvipshop() if isElement(vipshop) then desroyElement(vipshop) else x,y= guiGetScreenSize() vipshop = guiCreateWindow(0, 0, x-100, y-100, "Shop Vip", true ) guiWindowSetMovable ( vipshop, true ) changenamecharacter = guiCreateButton(0.8, 0.8, 100, 200, "Change Name", true, vipshop ) showCursor(true) function onClickButton() triggerClientEvent("changenamec",getElementRoot(),changenamecharacter) showCursor(true) destroyElement(vipshop) end end addEventHandler("onClientGUIClick", doiten, onClickButton ) end bindKey ("F2", "down", openvipshop) Link to comment
huyjvguyen Posted July 29, 2015 Author Share Posted July 29, 2015 wrong, i was check with mta script editor Link to comment
huyjvguyen Posted July 29, 2015 Author Share Posted July 29, 2015 sorry your fix is good not error, i will start it 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