Adham Posted April 23, 2016 Posted April 23, 2016 سلام عليكم اانا اليوم عامل للوحةة عاوز اللوحة متفتحش لاي حد عاوز اللوحة تفتح للكاتب سريالو بس انا معيش الكود مثلن عاوز كود اكتب سريال الفتحلو اللوحة الما كاتب سريالو ما تفتح له لوجة
SycroX Posted April 23, 2016 Posted April 23, 2016 local player = getLocalPlayer() function OpenWnd () if getPlayerSerial(player) == "Serial1" or getPlayerSerial(player) == "Serial2" or getPlayerSerial(player) == "Serial3" then if (guiGetVisible (window) == true) then guiSetVisible (window, false) showCursor (false) else guiSetVisible (window, true) showCursor (true) end else outputChatBox("#FF0000You are not have access to open this panel !!",0,255,255) end end addCommandHandler ( "open", OpenWnd )
Abdul KariM Posted April 23, 2016 Posted April 23, 2016 عشان تجيب الاعب من سرياله getPlayerFromSerial -- Useful Functions guiGetText -- عشان تجيب الي مكتوب بالايدت , الخ guiSetVisible -- تفتح له اللوحة _
Adham Posted April 23, 2016 Author Posted April 23, 2016 ممكن تعملي دي تفتح بحرف خ بدل ف8 local player = getLocalPlayer() function OpenWnd () if getPlayerSerial(player) == "Serial1" or getPlayerSerial(player) == "Serial2" or getPlayerSerial(player) == "Serial3" then if (guiGetVisible (window) == true) then guiSetVisible (window, false) showCursor (false) else guiSetVisible (window, true) showCursor (true) end else outputChatBox("#FF0000You are not have access to open this panel !!",0,255,255) end end addCommandHandler ( "open", OpenWnd )
#|_oskar_|# Posted April 23, 2016 Posted April 23, 2016 Serial = { ["serial"] = true, } bindKey ( "o", "down", function ( ) if Serial[getPlayerSerial(localPlayer)] then guiSetVisible (window,not guiGetVisible (window)) showCursor (guiGetVisible (window)) else outputChatBox(" Access denied ",255, 100, 70 ) end end)
Jupi Posted April 23, 2016 Posted April 23, 2016 Serial = { ["serial"] = true, } bindKey ( "o", "down", function ( ) if Serial[getPlayerSerial(localPlayer)] then guiSetVisible (window,not guiGetVisible (window)) showCursor (guiGetVisible (window)) else outputChatBox(" Access denied ",255, 100, 70 ) end end) Note: The client side version of getPlayerSerial has been deprecated as it can return the wrong value for some players, and is potentially insecure. The following article assumes that the function is serverside only. ^
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