3ssol Posted June 15, 2013 Share Posted June 15, 2013 السلام عليكم شباب سويت كذا وماضبط ووش فيه function OpenWin ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then triggerClientEvent ( player,'ShowGui',player ) else outputChatBox ( "فقط الكونسل ", player, 20,230,249, true ) end end bindKey("F1", "down", OpenWin) Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 bindKey ( player thePlayer, string key, string keyState, function handlerFunction, [ var arguments, ... ] ) Link to comment
3ssol Posted June 15, 2013 Author Share Posted June 15, 2013 سويت كذا وماضبط bindKey(player,"F1", "down", OpenWin) Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 addEventHandler('onPlayerJoin',root, function ( ) bindKey ( source,'F1','down',aHandler ) end ) addEventHandler('onResourceStart',resourceRoot, function ( ) for index,player in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( player,'F1','down',aHandler ) end end ) function aHandler ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then triggerClientEvent ( player,'ShowGui',player ) else outputChatBox ( "فقط الكونسل ", player, 20,230,249, true ) end end Link to comment
AboShanab Posted June 15, 2013 Share Posted June 15, 2013 (edited) Delete Edited June 15, 2013 by Guest Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 Server Side .. # function OpenWin ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then triggerClientEvent ( player,'ShowGui',player ) else outputChatBox ( "فقط الكونسل ", player, 20,230,249, true ) end end Client Side .. # addEvent("ShowGui",true) addEventHandler("ShowGui",root, function () bindKey("YourKey","down",open) end ) open = function() guiSetVisible(Window,not guiGetVisible(Window)) showCursor(guiGetVisible(Window)) end ) التعديل Window الى اسم نافذتك YourKey = الى الزر اللي تبيه يفتح النافذة تقدر تقولي وش اللي بيشغل السيرفر ؟ و تقولي من وين جبت player = ? Link to comment
3ssol Posted June 15, 2013 Author Share Posted June 15, 2013 شككرا برستيج اانا احسبها زي النافذه >< يعني النافذه مايحتاج تسوي كل هذا و شكرا ابوشنب ذذ Link to comment
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