+Source|> Posted May 25, 2017 Posted May 25, 2017 سلام عليكم ابي كود لما اضغط على لاعب بالماوس يجيني لوحه مع مثال شكراا
+Source|> Posted May 25, 2017 Author Posted May 25, 2017 9 minutes ago, #BrosS said: getCursorPosition مثالا
N3xT Posted May 25, 2017 Posted May 25, 2017 13 minutes ago, #BrosS said: getCursorPosition الفنكشن خطأ, الصحيح onElementClicked 1
+Source|> Posted May 25, 2017 Author Posted May 25, 2017 Just now, N3xT said: الفنكشن خطأ, الصحيح onElementClicked مثال طيب
+Source|> Posted May 25, 2017 Author Posted May 25, 2017 1 minute ago, N3xT said: المثال بالويكي مب فاهم شي ضض عطني مثال بسيطط
N3xT Posted May 25, 2017 Posted May 25, 2017 function elementClicked( theButton, theState, thePlayer ) if theButton == "left" and theState == "down" then -- if left mouse button was pressed down outputChatBox( "You clicked " .. getElementType( source ), thePlayer ) -- print the element type to players chatbox end end addEventHandler( "onElementClicked", getRootElement(), elementClicked ) -- add a handler function for the event
+Source|> Posted May 25, 2017 Author Posted May 25, 2017 1 minute ago, N3xT said: function elementClicked( theButton, theState, thePlayer ) if theButton == "left" and theState == "down" then -- if left mouse button was pressed down outputChatBox( "You clicked " .. getElementType( source ), thePlayer ) -- print the element type to players chatbox end end addEventHandler( "onElementClicked", getRootElement(), elementClicked ) -- add a handler function for the event ذا نفس اللي بالويكي ضض طيب بحاول في
#BrosS Posted May 25, 2017 Posted May 25, 2017 6 minutes ago, N3xT said: الفنكشن خطأ, الصحيح onElementClicked شكرا ضض جات عبالي حطيتها مافهمت طلبه
+Source|> Posted May 25, 2017 Author Posted May 25, 2017 1 hour ago, #BrosS said: شكرا ضض جات عبالي حطيتها مافهمت طلبه 1 hour ago, #BrosS said: شكرا ضض جات عبالي حطيتها مافهمت طلبه local accName = getAccountName(getPlayerAccount(player)) addEventHandler("onElementClicked", root, function( theButton, theState, thePlayer ) if theButton == "left" and theState == "down" then if isObjectInACLGroup("user."..accName, aclGetGroup("Police") ) then triggerClientEvent(source, "tr", source) end end end ) يقول في مشكله في getAccountName ليه؟؟؟
#BrosS Posted May 25, 2017 Posted May 25, 2017 player غير معرفة وفيه تخبيص وترسل الترايقر بالشي اللي ضغطت عليه مو اللاعب
+Source|> Posted May 25, 2017 Author Posted May 25, 2017 7 minutes ago, #BrosS said: player غير معرفة وفيه تخبيص وترسل الترايقر بالشي اللي ضغطت عليه مو اللاعب عدلها طيب ؟؟؟؟
Master_MTA Posted May 26, 2017 Posted May 26, 2017 addEventHandler("onElementClicked", root, function( theButton, theState, thePlayer ) local accName = getAccountName(getPlayerAccount(thePlayer)) if theButton == "left" and theState == "down" then if isObjectInACLGroup("user."..accName, aclGetGroup("Police") ) then triggerClientEvent(source, "tr", source) end end end ) سهل على نفسك الامر طلبك غير مشفر هنا http://www.mtaarabs.com/vb/showthread.php?t=1157
+Source|> Posted May 26, 2017 Author Posted May 26, 2017 7 minutes ago, Master_MTA said: addEventHandler("onElementClicked", root, function( theButton, theState, thePlayer ) local accName = getAccountName(getPlayerAccount(thePlayer)) if theButton == "left" and theState == "down" then if isObjectInACLGroup("user."..accName, aclGetGroup("Police") ) then triggerClientEvent(source, "tr", source) end end end ) شكرا لك + addEvent("veh",true) addEventHandler("veh",root, function (player) local veh = getPedOccupiedVehicle(player) destroyElement(veh) end end ) هل فيه خطأ
Master_MTA Posted May 26, 2017 Posted May 26, 2017 Just now, A7MEDENO said: شكرا لك + addEvent("veh",true) addEventHandler("veh",root, function (player) local veh = getPedOccupiedVehicle(player) destroyElement(veh) end end ) هل فيه خطأ لا اهم شي تكون معرف اللاعب في التراجر
+Source|> Posted May 26, 2017 Author Posted May 26, 2017 Just now, Master_MTA said: لا اهم شي تكون معرف اللاعب في التراجر addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[2] then if isPedInVehicle(player) then triggerServerEvent("veh",localPlayer) else outputChatBox("اللاعب لا يملك سيارة",255,0,0,true) end end end ) معرف؟؟
Master_MTA Posted May 26, 2017 Posted May 26, 2017 addEvent("veh",true) addEventHandler("veh",root, function () local veh = getPedOccupiedVehicle(source) destroyElement(veh) end end )
+Source|> Posted May 26, 2017 Author Posted May 26, 2017 5 minutes ago, Master_MTA said: addEvent("veh",true) addEventHandler("veh",root, function () local veh = getPedOccupiedVehicle(source) destroyElement(veh) end end ) thx بس به مشكلة ثانية انا سويت ان للاعب تنسحب سيارتة else في الشات اللاعب لا يملك سيارة بس لما سويت الس صار لما يضغط على اي لوحه تجي هالكلمة ؟؟؟؟؟؟؟؟؟؟
Master_MTA Posted May 26, 2017 Posted May 26, 2017 1 minute ago, A7MEDENO said: thx بس به مشكلة ثانية انا سويت ان للاعب تنسحب سيارتة else في الشات اللاعب لا يملك سيارة بس لما سويت الس صار لما يضغط على اي لوحه تجي هالكلمة ؟؟؟؟؟؟؟؟؟؟ ما فهمت
+Source|> Posted May 26, 2017 Author Posted May 26, 2017 Just now, Master_MTA said: ما فهمت شف addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[2] then triggerServerEvent("veh",localPlayer) else outputChatBox(" اللاعب لا يملك سيارة ",255,0,0,true) end end ) بعد ما سويتها صرت افتح اي لوحه اضغط بس عليها يجين اللي في الشات ان اللاعب لا يملك سيارة
Master_MTA Posted May 26, 2017 Posted May 26, 2017 1 minute ago, A7MEDENO said: شف addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[2] then triggerServerEvent("veh",localPlayer) else outputChatBox(" اللاعب لا يملك سيارة ",255,0,0,true) end end ) بعد ما سويتها صرت افتح اي لوحه اضغط بس عليها يجين اللي في الشات ان اللاعب لا يملك سيارة وانت وش تبي تسوي؟ addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[2] then if isPedInVehicle(localPlayer) then triggerServerEvent("veh",localPlayer) else outputChatBox(" اللاعب لا يملك سيارة ",255,0,0,true) end end end ) جرب اتوقع قصدك كذا انت
+Source|> Posted May 26, 2017 Author Posted May 26, 2017 1 minute ago, Master_MTA said: وانت وش تبي تسوي؟ addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[2] then if isPedInVehicle(localPlayer) then triggerServerEvent("veh",localPlayer) else outputChatBox(" اللاعب لا يملك سيارة ",255,0,0,true) end end end ) يعني لما يضغط الزر لو اللاعب ما معه سيارة يقوله في الشات لكن هو لو ضغط اي زر في اي لوحه برا المود تجيه
Master_MTA Posted May 26, 2017 Posted May 26, 2017 Just now, A7MEDENO said: يعني لما يضغط الزر لو اللاعب ما معه سيارة يقوله في الشات لكن هو لو ضغط اي زر في اي لوحه برا المود تجيه يب رح جرب الكود حقي بيزبط باذن الله
+Source|> Posted May 26, 2017 Author Posted May 26, 2017 Just now, Master_MTA said: يب رح جرب الكود حقي بيزبط باذن الله شكرا ظبط ممكن اخر شي لما اظغط مثلا حرف b يظهرلي ماوس ابي ارجع اظغطها عشان يخفيه ما يخفيه؟؟؟
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