#StrOnG_,) Posted March 24, 2016 Posted March 24, 2016 بملفت سيرفر حدث الضغط ع الالمنت مو مسوي تحقق ان اللى اشر عليه سياراه او لاعبوبملف كلنت مسوي اللى يضغط حرف ال m تفتح له اللوحه والماوز مو مسوي له اخفاء بعد اظهاره ذا اللى لاحظته بالكود على حسب كلامك كذا يصير -- # Server addEvent("check",true) addEventHandler("check",root, function() local acc=getPlayerAccount(client) if(isObjectInACLGroup("user."..getAccountName(acc),aclGetGroup("Police"))) then -- أسم القروب triggerClientEvent(client,"openre",client) end end ) addEventHandler( "onElementClicked",root, function ( x, y, p ) triggerServerEvent ( "check", localPlayer ) end ) -- # Client function strong ( ) guiSetVisible (WndName, true) showCursor (true) end addEvent( "openre", true ) addEventHandler( "openre",root,strong) bindKey( "M", "down", function() showCursor (true) end)
Adham Posted March 24, 2016 Posted March 24, 2016 انا جرب ذا + اشتغل تمام client side function strong ( ) guiSetVisible (WndName, true) showCursor (true) end addEvent( "openGui", true ) addEventHandler( "openGui",root,strong) bindKey( "M", "down", function() triggerServerEvent ( "check", localPlayer ) guiSetVisible ( WndName, not guiGetVisible ( wndName ) ) showCursor ( guiGetVisible ( WndName ) ) end) server side addEvent("check",true) addEventHandler("check",root, function() local account = getPlayerAccount(client) if(isObjectInACLGroup("user."..getAccountName(account),aclGetGroup("Police"))) then triggerClientEvent(client,"openre",client) end end ) addEventHandler( "onElementClicked",root, function ( x, y, z ) triggerClientEvent ( source, "openGui ,source") end
#StrOnG_,) Posted March 24, 2016 Posted March 24, 2016 انا جرب ذا + اشتغل تمامclient side function strong ( ) guiSetVisible (WndName, true) showCursor (true) end addEvent( "openGui", true ) addEventHandler( "openGui",root,strong) bindKey( "M", "down", function() triggerServerEvent ( "check", localPlayer ) guiSetVisible ( WndName, not guiGetVisible ( wndName ) ) showCursor ( guiGetVisible ( WndName ) ) end) server side addEvent("check",true) addEventHandler("check",root, function() local account = getPlayerAccount(client) if(isObjectInACLGroup("user."..getAccountName(account),aclGetGroup("Police"))) then triggerClientEvent(client,"openre",client) end end ) addEventHandler( "onElementClicked",root, function ( x, y, z ) triggerClientEvent ( source, "openGui ,source") end كيف شغال تمام triggerClientEvent ( source, "openGui ,source") -- lol Edit # triggerClientEvent ( source, "openGui",source) openre -- ترايقر غير مضاف ..
Adham Posted March 24, 2016 Posted March 24, 2016 اعتقد ذا او ذا. triggerClientEvent ( source, "openGui", source,) - triggerClientEvent ( source, "openGui", source )
#StrOnG_,) Posted March 24, 2016 Posted March 24, 2016 اعتقد ذا او ذا. triggerClientEvent ( source, "openGui", source,) - triggerClientEvent ( source, "openGui", source ) ليه حاط فاصلة ؟ triggerClientEvent ( source, "openGui", source,) !! كذا يصير triggerClientEvent ( source, "openGui", source) لاهنت اذا ما تعرف لا تكتب تعليقات مالها داعي
Adham Posted March 24, 2016 Posted March 24, 2016 اعتقد ذا او ذا. triggerClientEvent ( source, "openGui", source,) - triggerClientEvent ( source, "openGui", source ) ليه حاط فاصلة ؟ triggerClientEvent ( source, "openGui", source,) !! كذا يصير triggerClientEvent ( source, "openGui", source) لاهنت اذا ما تعرف لا تكتب تعليقات مالها داعي فيه شي عندك خطا انت عامل قوس ( مب جنب بعض source والقوس التاني جبنو يصير كذا triggerClientEvent ( source, "openGui", source) edit# triggerClientEvent ( source, "openGui", source )
#StrOnG_,) Posted March 24, 2016 Posted March 24, 2016 اعتقد ذا او ذا. triggerClientEvent ( source, "openGui", source,) - triggerClientEvent ( source, "openGui", source ) ليه حاط فاصلة ؟ triggerClientEvent ( source, "openGui", source,) !! كذا يصير triggerClientEvent ( source, "openGui", source) لاهنت اذا ما تعرف لا تكتب تعليقات مالها داعي فيه شي عندك خطا انت عامل قوس ( مب جنب بعض source والقوس التاني جبنو يصير كذا triggerClientEvent ( source, "openGui", source) edit# triggerClientEvent ( source, "openGui", source ) عادي ما يفرق !!
#|_oskar_|# Posted March 24, 2016 Posted March 24, 2016 مثال بسيط وان شاء الله بتفهم منه local screenW, screenH = guiGetScreenSize() window = guiCreateWindow((screenW - 212) / 2, (screenH - 76) / 2, 212, 76, "", false) guiWindowSetSizable(window, false) button = guiCreateButton(9, 34, 193, 32, "اغلاق", false, window) ---- guiSetVisible (window,false) addEvent("open",true) addEventHandler("open",root, function() guiSetVisible (window,true) end) --- bindKey( "m", "down", function() triggerServerEvent ( "show",localPlayer) end) ------ addEvent("m",true) addEventHandler("m",root, function() showCursor ( not isCursorShowing ()) end) addEventHandler ("onClientGUIClick",button,function () guiSetVisible (window,false) showCursor (false) end,false) addEvent("show",true) addEventHandler("show",root,function () for _,plr in ipairs (getElementsByType("player")) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(plr )),aclGetGroup("Admin")) ) then triggerClientEvent(plr ,"m",plr ) else outputChatBox("Access denied",source,255,0,0) end end end) addEventHandler( "onElementClicked",root,function (x,y,z) if ( getElementType(source) == "player" ) then if (isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Admin"))) then triggerClientEvent(source,"open",source) end end end)
Jupi Posted March 24, 2016 Posted March 24, 2016 مثال بسيط وان شاء الله بتفهم منه local screenW, screenH = guiGetScreenSize() window = guiCreateWindow((screenW - 212) / 2, (screenH - 76) / 2, 212, 76, "", false) guiWindowSetSizable(window, false) button = guiCreateButton(9, 34, 193, 32, "اغلاق", false, window) ---- guiSetVisible (window,false) addEvent("open",true) addEventHandler("open",root, function() guiSetVisible (window,true) end) --- bindKey( "m", "down", function() triggerServerEvent ( "show",localPlayer) end) ------ addEvent("m",true) addEventHandler("m",root, function() showCursor ( not isCursorShowing ()) end) addEventHandler ("onClientGUIClick",button,function () guiSetVisible (window,false) showCursor (false) end,false) addEvent("show",true) addEventHandler("show",root,function () for _,plr in ipairs (getElementsByType("player")) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(plr )),aclGetGroup("Admin")) ) then triggerClientEvent(plr ,"m",plr ) else outputChatBox("Access denied",source,255,0,0) end end end) addEventHandler( "onElementClicked",root,function (x,y,z) if ( getElementType(source) == "player" ) then if (isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Admin"))) then triggerClientEvent(source,"open",source) end end end) addEventHandler("onElementClicked", root, function (S, M, Player) if getElementType(Player) == "player" and S == "up" and M == "left" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(Player)), aclGetGroup("Admin")) then triggerClientEvent(Player, "open", Player) end end end ) ^
#|_oskar_|# Posted March 25, 2016 Posted March 25, 2016 addEventHandler("onElementClicked", root, function (S, M, Player) if getElementType(Player) == "player" and S == "up" and M == "left" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(Player)), aclGetGroup("Admin")) then triggerClientEvent(Player, "open", Player) end end end ) ^ addEventHandler("onElementClicked", root, function (S, M, Player) if S == "left" and M == "down" and getElementType(source) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then triggerClientEvent(Player, "open", Player) end end end)
Jupi Posted March 25, 2016 Posted March 25, 2016 addEventHandler("onElementClicked", root, function (S, M, Player) if getElementType(Player) == "player" and S == "up" and M == "left" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(Player)), aclGetGroup("Admin")) then triggerClientEvent(Player, "open", Player) end end end ) ^ addEventHandler("onElementClicked", root, function (S, M, Player) if S == "left" and M == "down" and getElementType(source) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(Player)), aclGetGroup("Admin")) then triggerClientEvent(Player, "open", Player) end end end) المفروض getAccountName(getPlayerAccount(Player)) Player مو المصدر لان المصدر هو الاعب المضغوط هو يبي يتحقق انه اللي ضغط هو اللي معاه ادمن ثم تفتح له اللوحة
` Allawi Posted March 25, 2016 Posted March 25, 2016 ركزوا شوي يا شباب لانكم جايبين العيد في حدث onElementClicked
#|_oskar_|# Posted March 25, 2016 Posted March 25, 2016 ركزوا شوي يا شباب لانكم جايبين العيد في حدثonElementClicked الاكواد صح بس فعلا انا كنت غلطات فى الكود ذا getAccountName(getPlayerAccount(Player)) --والاخ دابل وضح لى الخطاء
` Allawi Posted March 25, 2016 Posted March 25, 2016 ركزوا شوي يا شباب لانكم جايبين العيد في حدثonElementClicked الاكواد صح بس فعلا انا كنت غلطات فى الكود ذا getAccountName(getPlayerAccount(Player)) --والاخ دابل وضح لى الخطاء انت اذا جربته مع نفسك راح يكون شغال تمام لاكن لما تجربه مع شخص راح تعرف الاخطاء
SycroX Posted March 25, 2016 Posted March 25, 2016 onElementClickedServerside event</strong></p>\n<p><strong>This event is triggered when an element is clicked on by the client. These events can only trigger when the client has its cursor enabled. It triggers for all three mousebuttons in both their up and down states.</strong></p>\n<p><strong>Parameters</strong></p>\n<p><strong>string mouseButton, string buttonState, player playerWhoClicked, float clickPosX, float clickPosY, float clickPosZ</strong></p>\n<p><strong>mouseButton: A string representing the mousebutton that was clicked. This might be left, middle or right.</strong></p>\n<p><strong>buttonState: A string representing what state the button clicked is in. This might be up or down.</strong></p>\n<p><strong>playerWhoClicked: The player that clicked on the element</strong></p>\n<p><strong>clickPosX: The X position in the world the player clicked at</strong></p>\n<p><strong>clickPosY: The Y position in the world the player clicked at</strong></p>\n<p><strong>clickPosZ: The Z position in the world the player clicked at</strong></p>\n<p><strong><span style=\"color:#FF0000;\">Source</span></strong></p>\n<p><strong><span style=\"color:#FF0000;\">The source of this event is the element that got clicked by the player</span></strong><strong>.
Jupi Posted March 25, 2016 Posted March 25, 2016 onElementClickedServerside event</strong><p><strong>This event is triggered when an element is clicked on by the client. These events can only trigger when the client has its cursor enabled. It triggers for all three mousebuttons in both their up and down states.</strong></p>\n<p><strong>Parameters</strong></p>\n<p><strong>string mouseButton, string buttonState, player playerWhoClicked, float clickPosX, float clickPosY, float clickPosZ</strong></p>\n<p><strong>mouseButton: A string representing the mousebutton that was clicked. This might be left, middle or right.</strong></p>\n<p><strong>buttonState: A string representing what state the button clicked is in. This might be up or down.</strong></p>\n<p><strong>playerWhoClicked: The player that clicked on the element</strong></p>\n<p><strong>clickPosX: The X position in the world the player clicked at</strong></p>\n<p><strong>clickPosY: The Y position in the world the player clicked at</strong></p>\n<p><strong>clickPosZ: The Z position in the world the player clicked at</strong></p>\n<p><strong><span style=\"color:#FF0000;\">Source</span></strong></p>\n<p><strong><span style=\"color:#FF0000;\">The source of this event is the element that got clicked by the player</span></strong><strong>. احلف
#|_oskar_|# Posted March 25, 2016 Posted March 25, 2016 (edited) ركزوا شوي يا شباب لانكم جايبين العيد في حدثonElementClicked الاكواد صح بس فعلا انا كنت غلطات فى الكود ذا getAccountName(getPlayerAccount(Player)) --والاخ دابل وضح لى الخطاء انت اذا جربته مع نفسك راح يكون شغال تمام لاكن لما تجربه مع شخص راح تعرف الاخطاء جربه انت مع اي شخص وشوف local screenW, screenH = guiGetScreenSize() window = guiCreateWindow((screenW - 312) / 2, (screenH - 141) / 2, 312, 141, "معلومات اللاعب", false) guiWindowSetSizable(window, false) guiSetAlpha(window, 1.00) label1 = guiCreateLabel(4, 26, 293, 23,'', false, window) label2 = guiCreateLabel(4, 45, 293, 23,'', false, window) label3 = guiCreateLabel(4, 70, 293, 23,'', false, window) button = guiCreateButton(9, 99, 293, 28, "اغلاق اللوحه", false, window) guiSetFont(button, "default-bold-small") guiSetProperty(button, "NormalTextColour", "FFA25401") ---- guiSetVisible (window,false) addEvent("open",true) addEventHandler("open",root, function(name,Serial,ip) guiSetVisible (window,true) guiSetText(label1,'اسم اللاعب : ' ..tostring(name)) guiSetText(label2,'سيريال اللاعب : ' ..tostring(Serial)) guiSetText(label3,'الايبي : ' ..tostring(ip)) end) --- bindKey( "z", "down", function() triggerServerEvent ( "show",localPlayer) end) ------ addEvent("m",true) addEventHandler("m",root, function() showCursor ( not isCursorShowing ()) end) addEventHandler ("onClientGUIClick",button,function () guiSetVisible (window,false) showCursor (false) end,false) for i,Label in pairs ({label1,label2,label3}) do guiSetFont(Label, "default-bold-small") guiSetProperty (Label, "TextColours", "tl:FF00FF00 tr:FF00FF00 bl:FFFF0000 br:FFFF0000") guiLabelSetHorizontalAlign(Label, "right", false) guiLabelSetVerticalAlign(Label, "center") end addEvent("show",true) addEventHandler("show",root,function () for _,plr in ipairs (getElementsByType("player")) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(plr )),aclGetGroup("Admin")) ) then triggerClientEvent(plr ,"m",plr ) end end end) addEventHandler("onElementClicked", root, function (S, M, Player) if S == "left" and M == "down" and getElementType(source) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(Player)), aclGetGroup("Admin")) then triggerClientEvent(Player, "open", Player,getPlayerName( source ),getPlayerSerial(source),getPlayerIP (source)) end end end) Edited March 25, 2016 by Guest
Abdul KariM Posted March 25, 2016 Posted March 25, 2016 ^ يختصر الوضع عشان مايطول الاكواد حقت الليبل فاهم غلط اقصد اللوب في سطر 3 z كذا راح يقفل / يفتح الماوس لكل الاعبين كل مايضغط يوم يضغط على الاعب ويجيب حسابه لازم تتحق ان المضغوط عليه مسجل دخوله والي ضغط بعد
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