Jump to content

ماتتفح بمكان محدد


Recommended Posts

local Maarker = createColRectangle ( 1150.05579, -1390.17407,70,100) 
bindKey( "F7", "down", 
function() 
    if not isElementWithinColShape( localPlayer, Maarker ) then 
        guiSetVisible( DrugUseWindow, not guiGetVisible( DrugUseWindow ) ) 
        showCursor( guiGetVisible( DrugUseWindow ) ) 
    end 
end ) 
  
addEventHandler( "onClientColShapeHit", resourceRoot, 
function( hitPlayer ) 
    if ( source == Maarker ) and ( hitPlayer == localPlayer ) then 
        if ( guiGetVisible( DrugUseWindow ) ) then 
            guiSetVisible( DrugUseWindow, false ) 
            showCursor( false ) 
        end 
    end 
end ) 

:| غربية المفروض ما تفتح لو كنت بالكول شيب

Link to comment

جرب هاذى الطريقه

function log() 
guiSetVisible( DrugUseWindow, not guiGetVisible( DrugUseWindow ) ) 
showCursor( guiGetVisible( DrugUseWindow ) ) 
end  
bindKey( "F7", "down", log) 
  
addEventHandler( "onClientColShapeHit", resourceRoot, 
function( hitPlayer ) 
if ( source == Maarker ) and ( hitPlayer == localPlayer ) then 
unbindKey( "F7", "down", log) 
guiSetVisible( DrugUseWindow, false ) 
showCursor(false) 
end 
end) 
  
addEventHandler( "onClientColShapeLeave", resourceRoot, 
function( hitPlayer ) 
if ( source == Maarker ) and ( hitPlayer == localPlayer ) then 
bindKey( "F7", "down", log) 
end 
end) 

Link to comment
local Maarker = createColRectangle ( 1150.05579, -1390.17407,70,100) 
bindKey( "F7", "down", 
function() 
    if not isElementWithinColShape( localPlayer, Maarker ) then 
        guiSetVisible( DrugUseWindow, not guiGetVisible( DrugUseWindow ) ) 
        showCursor( guiGetVisible( DrugUseWindow ) ) 
    end 
end ) 
  
addEventHandler( "onClientColShapeHit", resourceRoot, 
function( hitPlayer ) 
    if ( source == Maarker ) and ( hitPlayer == localPlayer ) then 
        if ( guiGetVisible( DrugUseWindow ) ) then 
            guiSetVisible( DrugUseWindow, false ) 
            showCursor( false ) 
        end 
    end 
end ) 

:| غربية المفروض ما تفتح لو كنت بالكول شيب

لا اخوي الان داخل الكول شي تفتح خارجة ماتفتح ابدا

انا ابي العكس خارج الكول شيب تفتح داخله لا

Link to comment
جرب هاذى الطريقه
function log() 
guiSetVisible( DrugUseWindow, not guiGetVisible( DrugUseWindow ) ) 
showCursor( guiGetVisible( DrugUseWindow ) ) 
end  
bindKey( "F7", "down", log) 
  
addEventHandler( "onClientColShapeHit", resourceRoot, 
function( hitPlayer ) 
if ( source == Maarker ) and ( hitPlayer == localPlayer ) then 
unbindKey( "F7", "down", log) 
guiSetVisible( DrugUseWindow, false ) 
showCursor(false) 
end 
end) 
  
addEventHandler( "onClientColShapeLeave", resourceRoot, 
function( hitPlayer ) 
if ( source == Maarker ) and ( hitPlayer == localPlayer ) then 
bindKey( "F7", "down", log) 
end 
end) 

نفس كود الرجال داخل الكول تفتح خارجة لا

Link to comment
لم تتم الافادة باانتظار تصحيح الكود

اطرح كودك

local Maarker = createColRectangle ( 1150.05579, -1390.17407,70,100) 
bindKey( "F7", "down", 
function() 
    if not isElementWithinColShape( localPlayer, Maarker ) then 
        guiSetVisible( DrugUseWindow, not guiGetVisible( DrugUseWindow ) ) 
        showCursor( guiGetVisible( DrugUseWindow ) ) 
    end 
end ) 
  
addEventHandler( "onClientColShapeHit", resourceRoot, 
function( hitPlayer ) 
    if ( source == Maarker ) and ( hitPlayer == localPlayer ) then 
        if ( guiGetVisible( DrugUseWindow ) ) then 
            guiSetVisible( DrugUseWindow, false ) 
            showCursor( false ) 
        end 
    end 
end ) 

Link to comment
لم تتم الافادة باانتظار تصحيح الكود

اطرح كودك

local Maarker = createColRectangle ( 1150.05579, -1390.17407,70,100) 
bindKey( "F7", "down", 
function() 
    if not isElementWithinColShape( localPlayer, Maarker ) then 
        guiSetVisible( DrugUseWindow, not guiGetVisible( DrugUseWindow ) ) 
        showCursor( guiGetVisible( DrugUseWindow ) ) 
    end 
end ) 
  
addEventHandler( "onClientColShapeHit", resourceRoot, 
function( hitPlayer ) 
    if ( source == Maarker ) and ( hitPlayer == localPlayer ) then 
        if ( guiGetVisible( DrugUseWindow ) ) then 
            guiSetVisible( DrugUseWindow, false ) 
            showCursor( false ) 
        end 
    end 
end ) 

شغال تمام عندى لو دخلت الكول شيب ماتفتح اللوحه ولو خرجت منه تفتح عادى

Link to comment

حتى اني شلته بس مافي اخطاء بالديبوق ومعاد يشتغل وتظهر اللوحة

local Maarker = createColRectangle (1539.168, -1640.124, 36.5, 27, 2) 
function no () 
    if not isElementWithinColShape( localPlayer, Maarker ) then 
        guiSetVisible( DrugUseWindow, not guiGetVisible( DrugUseWindow ) ) 
        showCursor( guiGetVisible( DrugUseWindow ) ) 
    end 
end  
  
addEventHandler( "onClientColShapeHit", resourceRoot, 
function( hitPlayer ) 
    if ( source == Maarker ) and ( hitPlayer == localPlayer ) then 
        if ( guiGetVisible( DrugUseWindow ) ) then 
            guiSetVisible( DrugUseWindow, false ) 
            showCursor( false ) 
        end 
    end 
end ) 

Link to comment

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.
×
×
  • Create New...