Tokio Posted July 9, 2017 Posted July 9, 2017 https://community.multitheftauto.com/index.php?p=resources&s=details&id=3251 I downloaded this script, but when i move a player to jail, he can access the FR GUI, and "escape" from jail. How can i disable FR GUI access from imprisoned peoples? My servers: Fun: Derby(DD):
itHyperoX Posted July 9, 2017 Posted July 9, 2017 if showWho ~= true then outputChatBox("** #FFFF00You Jailed [ "..getPlayerName(thePlayer).." #FFFF00] at "..theJail[1].." For "..time,source,255,0,0,true) outputChatBox("** #FFFF00You Have Been Jailed By [ "..getPlayerName(source).." #FFFF00] at "..theJail[1].." For "..time,thePlayer,255,0,0,true) setElementData(thePlayer,"Jailed",true) end go to freeroam, find the "bindkey", then if getElementData(localPlayer,"Jailed") == true then return outputChatBox("You can't use this when you arrested") end Quote
Tokio Posted July 9, 2017 Author Posted July 9, 2017 24 minutes ago, TheMOG said: if showWho ~= true then outputChatBox("** #FFFF00You Jailed [ "..getPlayerName(thePlayer).." #FFFF00] at "..theJail[1].." For "..time,source,255,0,0,true) outputChatBox("** #FFFF00You Have Been Jailed By [ "..getPlayerName(source).." #FFFF00] at "..theJail[1].." For "..time,thePlayer,255,0,0,true) setElementData(thePlayer,"Jailed",true) end go to freeroam, find the "bindkey", then if getElementData(localPlayer,"Jailed") == true then return outputChatBox("You can't use this when you arrested") end does not working this the FR GUI is working when the player in a jail My servers: Fun: Derby(DD):
itHyperoX Posted July 9, 2017 Posted July 9, 2017 function toggleFRWindow() if getElementData(localPlayer,"Jailed") == true then cancelEvent() end if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else showCursor(true) showAllWindows() end end
Tokio Posted July 9, 2017 Author Posted July 9, 2017 8 minutes ago, TheMOG said: function toggleFRWindow() if getElementData(localPlayer,"Jailed") == true then cancelEvent() end if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else showCursor(true) showAllWindows() end end still not working My servers: Fun: Derby(DD):
Deep thinker Posted July 9, 2017 Posted July 9, 2017 (edited) use these in your jail code. setElementData getElementData triggerServerEvent triggerClientEvent "onPlayerContact" or create a colshape and disable using the fr command and unbind f1 in this colshape using these createColCuboid -- or createColRectangle -- "onColShapeLeave" "onColShapeHit" -- "onPlayerCommand" -- isElementWithinColShape -- unbindKey Edited July 9, 2017 by ProMax ☠ℙℝ☯M∀✗☠ Video Editor --- Images and pictures Editor. Trial LUA Scripter. Scripting Skills ↧ 26%
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