Tokio

[QUESTION] How to disable FR GUI in this script?

Recommended Posts

		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

 

Share this post


Link to post
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 :S 

Share this post


Link to post
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

 

Share this post


Link to post
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 :/

Share this post


Link to post

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 by ProMax

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.