LiOneLMeSsIShoT Posted November 29, 2013 Share Posted November 29, 2013 client: function showBriefcaseMission (button, state) if (button == "left" and state == "up") then guiSetVisible (MainWin, false) triggerClientEvent ("briefcasebtn", localplayer) showCursor (true) end end addEventHandler ("onClientGUIClick", BriefcaseMission, showBriefcaseMission) client: function briefcasebtn () guiSetVisible ("BriefcaseWin", true) end addEvent ("briefcasebtn", true) addEventHandler ("briefcasebtn", getRootElement(), briefcasebtn) error: attempt to call global 'triggerClientEvent' (a nil value) this problem because i can't trigger client event and i'm already in client event and not in server side? ..please help! Link to comment
myonlake Posted November 29, 2013 Share Posted November 29, 2013 In order to trigger events from same side, you have to use triggerEvent. Therefore switch triggerClientEvent to triggerEvent. Link to comment
LiOneLMeSsIShoT Posted November 29, 2013 Author Share Posted November 29, 2013 In order to trigger events from same side, you have to use triggerEvent. Therefore switch triggerClientEvent to triggerEvent. Alright i will try Link to comment
LiOneLMeSsIShoT Posted November 29, 2013 Author Share Posted November 29, 2013 In order to trigger events from same side, you have to use triggerEvent. Therefore switch triggerClientEvent to triggerEvent. Alright so when i tried it i got error in argument 2 got nil so Link to comment
myonlake Posted November 29, 2013 Share Posted November 29, 2013 "localplayer" is not a pre-defined variable. The correct way to spell it is "localPlayer". Switch it to that, and please look at your own code, it's not a big mistake and can be spotted quite easily. Link to comment
LiOneLMeSsIShoT Posted November 29, 2013 Author Share Posted November 29, 2013 "localplayer" is not a pre-defined variable. The correct way to spell it is "localPlayer". Switch it to that, and please look at your own code, it's not a big mistake and can be spotted quite easily. Thanks man 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