Jump to content

xxx[مساعدة]xxx


Doffy

Recommended Posts

ابي اول ما اللاعب يدخل كول شيب ما يقدر يشغل مثلا من اف 1 ل اف 12 ولما اللاعب يحاول يضغط من اف 1 ل 12 يقوله لا يمكنك تشغيل هذه اللوحات هنا

Edited by KinG_Himoo12
Link to comment
local ColS = createColRectangle ( ..... )

addEventHandler ( "onColShapeHit", root,
function ( thePlayer )
        if source == ColS then
        if getElementType ( thePlayer ) == "player" then 
		setElementData(source,"noCanUseKey",true)
		outputChatBox ( "Your entered the zone!", thePlayer, 255, 255, 109 )
		end
     end
  end
)

addEventHandler ( "onColShapeLeave", root,
function ( thePlayer )
		if source == ColS then
        if getElementType ( thePlayer ) == "player" then 
		setElementData(source,"noCanUseKey",false)
		outputChatBox ( "Your leaved the zone!", thePlayer, 255, 255, 109 )
		end
     end
  end
)
 local buttons = {
 ['F1'] = true,
 ['F3'] = true,
}
 
addEventHandler( 'onClientKey', root,
 function (button , press)
 if getElementData ( localPlayer , "noCanUseKey" ) == true then
    if press and getElementDimension(localPlayer) == 30 then
        if buttons[button] then
            outputChatBox("غير مصرح لك بفتح اللوحة الان ", 255, 0, 0)
                cancelEvent()
			end
        end
    end
end)

 

#Edit:

سطر 9 خليه كذا 

if press then

Edited by #_iMr.[E]coo
  • Like 1
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...