KITT1995 Posted August 23, 2011 Share Posted August 23, 2011 I made this code: function enableGUI () if getPedOccupiedVehicle(source) == false then outputChatBox ("You're not in a vehicle") else if guiGetVisible(GUI_Window[1]) == false then guiSetVisible(GUI_Window[1], true) showCursor(true) else guiSetVisible(GUI_Window[1], false) showCursor(false) end end end bindKey ("1", "down", enableGUI ) When i'm not in a car and I press 1 i get that message in chatbox, but when I'm in a car and I press 1 i get that message again and the GUI doesn't appear. Can someone help me? thanks Link to comment
JR10 Posted August 23, 2011 Share Posted August 23, 2011 function enableGUI () if getPedOccupiedVehicle(getLocalPlayer( )) == false then outputChatBox ("You're not in a vehicle") else if guiGetVisible(GUI_Window[1]) == false then guiSetVisible(GUI_Window[1], true) showCursor(true) else guiSetVisible(GUI_Window[1], false) showCursor(false) end end end bindKey ("1", "down", enableGUI ) Link to comment
KITT1995 Posted August 23, 2011 Author Share Posted August 23, 2011 Thanks again JR10. It works!! 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