CapY Posted August 14, 2011 Posted August 14, 2011 Is it possible when player joins to the server and when he press F1 to don't see these buttons: weapons , speed , grav and time . Can it be only available for admins ?
Castillo Posted August 14, 2011 Posted August 14, 2011 You can maybe disable them, and then trigger a event to the server to see if he's admin and if so, enable the buttons.
CapY Posted August 14, 2011 Author Posted August 14, 2011 onPlayerLogin, onPlayerLogout and can you give me more functions ?
JR10 Posted August 14, 2011 Posted August 14, 2011 You can use guiSetEnabled to disable a GUI element. When a player login ("onPlayerLogin") check if he's admin and triggerClientEvent according to it, if he's admin enable the buttons, if he's not disable them. Or maybe when the player press F1.
MTA Team qaisjp Posted August 15, 2011 MTA Team Posted August 15, 2011 -- client guiSetEnabled(getControl("grav"), false) look for more id's in the table "wndMain" or try: wndMain = {} at the end of ur script
CapY Posted August 15, 2011 Author Posted August 15, 2011 But only the gui will be hidden and functions will be available still ... How to fix it ?
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