Extremo Posted June 12, 2012 Share Posted June 12, 2012 Hey MTA Community, I would love to know if it is possible to make people not able to see the map at all. I don't only mean the radar map but also the one in the escape menu. Any help is very well appreciated. Please point me into the right direction too if it is possible. I already know you can hide the radar map with showPlayerHud, what I care most about is the map in the escape menu. Regards. Link to comment
Moderators IIYAMA Posted June 12, 2012 Moderators Share Posted June 12, 2012 Can't you cancel the button with cancelevent? Link to comment
BinSlayer1 Posted June 12, 2012 Share Posted June 12, 2012 Can't you cancel the button with cancelevent? wtf. don't reply for the sake of it if you have no idea what u talking about.. You can't cancel buttons with scripts. ontopic: there is no map in the escape menu.. so what map are you talking about? The only map in the escape menu is in the GTA:SA menu not MTA's If you mean that you want to forbid a player from seeing the menu then you cannot do this. If you mean that you want to remove the transparency from the menu so that the players can't see the gameplay anymore then you can detect when the menu is started by checking onClientKey + isChatBoxInputActive must return false and then simply draw a black picture onto the screen. edit: also u gotta check that console is not displayed either I dont remember the function for it you'll have to search the mtasa wiki for it Link to comment
micheal1230 Posted June 12, 2012 Share Posted June 12, 2012 I think He Means The F11 Map Link to comment
Jaysds1 Posted June 12, 2012 Share Posted June 12, 2012 try this: unbindKey("f11","down") Link to comment
Moderators IIYAMA Posted June 13, 2012 Moderators Share Posted June 13, 2012 wtf. don't reply for the sake of it if you have no idea what u talking about.. You can't cancel buttons with scripts. He isn't clear about "map" he is talking about. Yes you are right about that. I have never seen the map in the escape menu, so I thought he meant "f11". I don't know all the possibility's of lua in combination with mta, so please. Stop flaming at me, everybody have the right to reply as long it is no spam and it has to do with the subject. Link to comment
Extremo Posted June 13, 2012 Author Share Posted June 13, 2012 Hey, I am very sorry for not being clear. Yes I meant the map on F11. I'll go ahead and try the unbindKey immediatly! Thanks for the help, I'll report back as soon as I have some more news =). EDIT: Ok, it didn't work. Neither on the server nor on the client. Regards. Link to comment
Moderators IIYAMA Posted June 13, 2012 Moderators Share Posted June 13, 2012 btw I looked on google for disable f11 and I found this. https://forum.multitheftauto.com/viewtop ... 91&t=37288 I hope this will help you. ;D Regards IIYAMA >>>>>radar = Toggles the radar-map showing Link to comment
X-SHADOW Posted June 13, 2012 Share Posted June 13, 2012 This is my script for admin or any one select what you want .. --- for admin only ---serverSide function show () local acc = getAccountName(getPlayerAccount( source)) if isObjectInACLGroup('user.'..acc, aclGetGroup('Admin')) then toggleControl("radar", false) outputChatBox('Admin Has Hide the Map',source,255,0,0) else toggleControl("radar", true) outputChatBox('Admin Has Show the Map',source,0,255,255) end addCommandHandler('hide', show) ----- all time hide ---clientSide addEventHandler('onClientResourceStart', resourceRoot, function() toggleControl("radar", false) end) end Link to comment
Extremo Posted June 13, 2012 Author Share Posted June 13, 2012 btw I looked on google for disable f11 and I found this.https://forum.multitheftauto.com/viewtop ... 91&t=37288 I hope this will help you. ;D Regards IIYAMA >>>>>radar = Toggles the radar-map showing That helped greatly but one problem still persists. What if I wanted to enable it for one guy again? Not everyone but only one guy? Regards. Link to comment
myonlake Posted June 13, 2012 Share Posted June 13, 2012 btw I looked on google for disable f11 and I found this.https://forum.multitheftauto.com/viewtop ... 91&t=37288 I hope this will help you. ;D Regards IIYAMA >>>>>radar = Toggles the radar-map showing That's only for screen radar, doesn't affect to F11. Link to comment
Extremo Posted June 13, 2012 Author Share Posted June 13, 2012 btw I looked on google for disable f11 and I found this.https://forum.multitheftauto.com/viewtop ... 91&t=37288 I hope this will help you. ;D Regards IIYAMA >>>>>radar = Toggles the radar-map showing That's only for screen radar, doesn't affect to F11. Actually it does. The F11 map is disabled. I tried it myself. Link to comment
Moderators IIYAMA Posted June 13, 2012 Moderators Share Posted June 13, 2012 (edited) https://wiki.multitheftauto.com/wiki/ToggleControl client and server side and you want client side client: toggleControl("radar", false) You better take a good look at X-SHADOW his script. function stopMap ( ) local getElementData ( "radar_allow" ) if radar_allow == 1 then toggleControl("radar", true) else toggleControl("radar", false) end end addEventHandler ( "onClientResourceStart", resourceRoot, stopMap ) Edited June 13, 2012 by Guest Link to comment
Extremo Posted June 13, 2012 Author Share Posted June 13, 2012 https://wiki.multitheftauto.com/wiki/ToggleControlclient and server side and you want client side client: toggleControl("radar", false) You better take a good look at X-SHADOW his script. I don't think you understood my question precisely. I am trying to toggle the F11 map for everybody though if I give them a map script-wise I want to re-enable the map for them, but only for those who DO have a map. Link to comment
myonlake Posted June 13, 2012 Share Posted June 13, 2012 Actually it does. The F11 map is disabled. I tried it myself. Weird, for me it still displays it. Link to comment
Extremo Posted June 13, 2012 Author Share Posted June 13, 2012 Actually it does. The F11 map is disabled. I tried it myself. Weird, for me it still displays it. Are you sure you made it all clientside? function DisableMap() toggleControl("radar", false) end addEventHandler("onClientResourceStart", getRootElement(), DisableMap) Works flawless on clientside. @ Shadow Your script enables it for everybody or disables it for everybody doesn't it? I want to disable it for everybody and renable it for specific players - not everybody. Regards. Link to comment
X-SHADOW Posted June 13, 2012 Share Posted June 13, 2012 My script enables it and disables it by Admin only . Link to comment
Moderators IIYAMA Posted June 13, 2012 Moderators Share Posted June 13, 2012 Script by Shadow(add by this person......): ---serverSide function show () local acc = getAccountName(getPlayerAccount( source)) if isObjectInACLGroup('user.'..acc, aclGetGroup('RADAR_ENABLE')) then toggleControl("radar", false) outputChatBox('radar disable',source,255,0,0) else toggleControl("radar", true) outputChatBox('radar enable',source,0,255,255) end addCommandHandler('radar', show) ---clientSide addEventHandler('onClientResourceStart', resourceRoot, function() toggleControl("radar", false) end) end 1 On your server. admin> resources > manage acl > adgroupe "RADAR_ENABLE" 2 Ad user login names to this group and they will be able to have f11 map. (adobjects "user.") The command to make it visible is now: "radar" thx to shadow. Link to comment
X-SHADOW Posted June 13, 2012 Share Posted June 13, 2012 no need to make a group just use my script if you admin you can enable it or disable it .. Link to comment
Moderators IIYAMA Posted June 13, 2012 Moderators Share Posted June 13, 2012 yes, but if he changed his mind or he is not the only admin on the server. You never know 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