Leaderboard
Popular Content
Showing content with the highest reputation on 14/09/18 in Posts
-
تحتاج عنصرين اول شي شريط التمرير والزر حق السحب كما في الصورة شريط التمرير راح يكون له اربع متغيرات اللي هي الاحداثيات والطول والعرض x, y, w, h راح يكون له متغيرين thumb وزر شريط التمرير اللي اسمه thumb_y اول شي احداثياته y بما اننا راح نسوي شريط تمرير عمودي راح نستخدم الاحداثي والعكس مع الافقي THUMB_S اما المتغير الثاني اللي هو حجمه بما اننا نستخدم ثوابت فالأفضل نستخدم اسم متغير بحجم كبير progress راح يكون عندنا متغير ثاني وهو نسبة المثوية للشريط تكون اسمها يكون كل شي بالجدول التالي SCROLLBAR = { x = 0, y = 0, -- احداثيات الشريط w = 13, h = 480 -- الطول والعرض thumb_y = 0, -- الاحداثيات للزر progress = 0, -- نسبة التقدم THUMB_SIZE = 27, -- حجم الزر hold = true, -- راح اشرحها بعدين } وبسطت المفهوم بصورة اما بالنسبة للعملية الحسابية عشان تحريك الزر الازرق بسيطة اول شي نحتاج نعرف مكان الماوس راح نستخدم مكان الماوس في عمليتين 1- التحقق من ان الماوس داخل المنطقة الرمادية عند الضغط 2- بما اننا نستخدم شريط تمرير عمودي y ننقل الزر الازرق لاحدثيات الماوس راح نستخدم وظيفتين getCursorPosition getKeyState - mouse1(زر الماوس الايسر) وتكون حسابات الطريقة كالآتي hold عند الضغط على المنطقة الرمادية بالزر الايسر بالماوس نسوي متغير لكن عند افلات زر الماوس نلغي المتغير طبعا نحن نريد يفلت زر الماوس باي منطقة شرط يكون ضغط في البداية على المنطقة الرمادي كالآتي hold يكون عملية تحويل المتغير function render() local cx, cy = getCursorPosition() -- نجلب احداثيات الماوس -- نتحقق ان احداثيات الماوس داخل المربع المادي local hovered = cx >= SCROLLBAR.x and cx <= SCROLLBAR.h and cy >= SCROLLBAR.y and cy <= SCROLLBAR.h if hovered and getKeyState "mouse1" then -- نتحقق كمان ان الماوس مضغوط SCROLLBAR.hold = true -- hold نفعل قيمة end if hold and not getKeyState "mouse1" then -- hold اذا الاعب افلت زر الماوس وكان متفعل متغير SCROLLBAR.hold = false -- نلغي المتغير end -- hold if SCROLLBAR.hold then -- اذا تحقق الشرط هذا كما شرحنا سابقا بامكاننا نجري حساباتنا SCROLLBAR.thumb = ... SCROLLBAR.progress = ... end end onClientClick طبعا في طرق كثيرة مثلا باستخدام حدث لكن اخترت هذي عشان يكون كل الحسابات في مكان واحد ننتقل الى المرحلة المعقدة وهي عن الضغط او السحب نريد نقل الزر الازرق الى الاحداثيات المطلوبة لكن في مشاكل الأولى قد يتعدى الزر الازرق المنطقة الرمادية يكون فوق المنطقة او تحتها y نحتاج نعمل الحد الأدنى للإحداثيات وراح يكون اقل حد هو احداثيات المنطقة الرمادية وننقصه من طول الزر الازرق y اما للحد الأقصى هو طول المنطقة الرمادية مجموعة مع احداثيات يكون y : الحد الأدنى y+h-THUMB_SIZE : الحد الأقصى صار كذا عندنا نطاق لمكان الشريط الازرق يوضع فيه راح نستخدم math.max, math.min كذا حلينا المشكلة الأولى اما المشكلة الثانية هي التوسيط لما ننقل الزر الازرق لاحداثيات الماوس تصير مشكلة كما في الصورة الحل بسيط ناخذ احداثيات الماوس وننقصها من نص حجم الزر الازرق كما في المعادلة التالية cy-(THUMB_SIZE/2) يصير كذا حلينا كل المشاكل اللي تتعلق بالنقل تصير المعادلة الحاسبية لاحداثيات الزر الازرق كالتالي --[[ نتأكد ان قيمة احداثيات الماوس الازرق اصغر من الحد الأقصى واكبر من الحد الأدنى لنضعها في نطاق محدد لاتخرح عنه math.min( math.max( احداثيات الزر الازرق, الحد الأدنى ), الحد الأقصى ) ]] SCROLLBAR.thumb_y = math.min(math.max(cy-(t/2), SCROLLBAR.y), SCROLLBAR.y+SCROLLBAR.h-SCROLLBAR.THUMB_SIZE) اما بالنسبة لحساب النسبة المئوية نحتاج نخليه احداثيات الزر الازرق بالنسبة لاحداثيات المنطقة الرمادية يعني لو كانت احداثيات المنطقة الرمادية هي 100 واحداثيات الزر الازرق هي 150 فتصير الاحداثيات 50 بالنسبة الى المنطقة الرمادية y بالمتغير thumb_y يعني نحتاج نطرح المتغير كذا اعطانا قيمة اولى لحساب النسبة المثوية لكن نحتاج الى قيمة قصوى ثابتة وهي طول المنطقة الرمادية منقوصة من حجم الزر الازرق تصير الحسبة كالتالي SCROLLBAR.progress = math.floor((SCROLLBAR.thumb_y-SCROLLBAR.y)/(SCROLLBAR.h-SCROLLBAR.THUMB_SIZE)*100) يكون الكود النهائي كالتالي -- اتجاه شريط التمرير راح يكون عمودي -- y ومتغيرات لاحداثي x يعني راح نستخدم ثوابث لاحداثي SCROLLBAR = { x = 0, y = 0, -- احداثيات الشريط w = 13, h = 480 -- الطول والعرض thumb_y = 0, -- الاحداثيات للزر الازرق progress = 0, -- النسبة المئوية THUMB_SIZE = 32, -- حجم الزر hold = false, -- راح اشرحها بعدين } function render() -- onClientRender local cx, cy = getCursorPosition() -- نجلب احداثيات الماوس -- نتحقق ان احداثيات الماوس داخل المربع المادي local hovered = cx >= SCROLLBAR.x and cx <= SCROLLBAR.h and cy >= SCROLLBAR.y and cy <= SCROLLBAR.h if hovered and getKeyState "mouse1" then -- نتحقق كمان ان الماوس مضغوط SCROLLBAR.hold = true -- hold نفعل قيمة end if hold and not getKeyState "mouse1" then -- hold اذا الاعب افلت زر الماوس وكان متفعل متغير SCROLLBAR.hold = false -- نلغي المتغير end -- hold if SCROLLBAR.hold then -- اذا تحقق الشرط هذا كما شرحنا سابقا بامكاننا نجري حساباتنا --[[ نتأكد ان قيمة احداثيات الماوس الازرق اصغر من الحد الأقصى واكبر من الحد الأدنى لنضعها في نطاق محدد لاتخرح عنه math.min( math.max( احداثيات الزر الازرق, الحد الأدنى ) الحد الأقصى ) ]] SCROLLBAR.thumb_y = math.min(math.max(cy-(t/2), SCROLLBAR.y), SCROLLBAR.y+SCROLLBAR.h-SCROLLBAR.THUMB_SIZE) -- current/max -- المعادلة ذي تعطينة نسبة لشيء بالنسبة لشيء -- current : هي قيمة احداثيات الزر الازرق منقوصة من احداثيات المنطقة الرمادي عشان تعطينا الاحداثيات بالنسبة للمنطقة الرمادية -- max : هي القيمة الثابتة اللي بنينا عليها النسبة المئوية -- يكون الناتج نضربه ب100 يعطينا النسبة المئوية -- math.floor يعطينا رقم بدون كسور SCROLLBAR.progress = math.floor((SCROLLBAR.thumb_y-SCROLLBAR.y)/(SCROLLBAR.h-SCROLLBAR.THUMB_SIZE)*100) end -- الزر الازرق dxDrawRectangle(SCROLLBAR.x, SCROLLBAR.thumb_y, SCROLLBAR.w, SCROLLBARTHUMB_SIZE, 0x03a9f4ff) -- شريط التمرير اللي هي المنطقة الرمادية dxDrawRectangle(SCROLLBAR.x, SCROLLBAR.y, SCROLLBAR.w, SCROLLBAR.h, 0xb3b3b3ff) -- النسبة المئوية dxDrawText(SCROLLBAR.progress, SCROLLBAR.x, SCROLLBAR.y, SCROLLBAR.x+w, SCROLLBAR.y+SCROLLBAR.h, 0xffffffff, 1, font, "center", "center") end2 points
-
شي غريب ان الواحد له 3 اشهر ما كان لاقي سلسله افلام حلوه يتفرج عليها و الحين قبل الدراسه بـ2 يوم بالظبط الاقي فوق 5 سلاسل افلام عجبتني لا حول ولا قوه الي بلله ?2 points
-
Hello I created this program that will detect files/script that may have backdoor commands such as making your self admin if you type it, it is still in an early stage I will keep updating this program so it can find more backdoors. Download Program Thank you1 point
-
Hello. This is my new custom window system with widgets. Just rewrited window system, including this custom GUI widgets: - Scroll Panes - Buttons (+ buttons with images) - Progress Bars (automatic checking for vertical or horizontal using its size, square is horizontal) - Scroll Bars (same as progress bars) - Custom Themed Edit Boxes, Memo Boxes, new widget - Number Boxes (support mouse scrolling) - Check Boxes - Combo Boxes - Tab Panel with tabs - Labels - Dialog Boxes - Tooltips - Loading Circles - Table Views (Grid Lists) Here I've just used only OOP coding style, just copy this one lua file in your projects, and start this resource automatically, because this file getting directories from main resourcename, and using files without copying. Screenshots Video: Example - Login Panel. Author - Estet (DK). Tutorial of installation: Download (GitHub) Wiki Documentation Thank you.1 point
-
1 point
-
@KillerX بس حبيت اوضح ليش ماشتغل معاه الكود الاول تحقق ان الاعب بسيارة سواء كان السواق او الراكب او جالس في أي مكان وفيه ملاحظة بالويكي تقول ان الوظيفة غير ماراح تكون شغالة بالكلينت isPedInVehicle السبب ان الوظيفة getPedOccupiedVehicle عشان كذا لازم تستخدم1 point
-
Ah ta. Só setar uma data true no player quando inicia o render do painel e depois setar essa data false quando a renderização do painel é cancelada. Enquanto o jogador estiver com essa data, as binds da tecla T não funcionarão. addEventHandler ("onClientKey", root, function (button) if button == "t" then if getElementData (localPlayer, "loginPanel") then cancelEvent() end end end)1 point
-
Mas é pra isso mesmo. Ao apertar a tecla e cancelar esse evento, não será ativado no chat.1 point
-
بصراحة احنا مختلفين 90% درجة عن باقي السيرفرات بالمودات و بالرتب و بكل شيء لكن رح نحاول نصير 100% ان شاء الله مع الوقت و الدعم1 point
-
السيرفر جميل بس بصراحة ما اشوف فيه اختلافات بين السيرفرات الاخرى.. اتمنى انك تتميز بسيرفرك بعدة اشياء وبالتوفيق لك يالغالي1 point
-
السلام عليكم اليوم جايبلكم بعض الصور من سيرفر @#[K]iLLeR<3 وبعض المودات الي سواها وسويتها .. طبعا خشو شوفو المودات بأنفسكم لان في كثير لازم تستكشفوه الساعة 7 بتوقيت السعودية اليوم توزيعات ضخمة وفاعليات لمدة ساعة : ايبي السيرفر : mtasa://144.76.68.79:24323 اتمني منكم زيارة السيرفر .. ومع السلامة1 point
-
Keep going, I will make server based by your system. Just wait for it = )1 point
-
برفع واحد غيره باذن الله في الليل بس مكسل هههه برفع واحد غيره باذن الله في الليل بس مكسل هههه1 point
-
صراحة ملاحظ من الكثير يبغون السيرفر يكون اقرب للواقعية وان شاء الله بيكون واقعي قد ما اقدر بنسبة لمحطات البنزين فكرة حلوة .. وبخلي البنزين 100% بالكثير يخلص في خلال ساعة هذي فكرة شوي فيها عيوب لان بعض اللاعبين مركزين على اللعب اكثر من الواقعية وانشاء محلات بس الفكرة ممكن تتطبق بحيث ان فيه محلات اساسية مايمتلكها اللاعبين بس محلات عند اللاعبين بنفسهم يعني يروح للاعب الي هو تاجر ويشتري منه بعض الاشياء همم ودي اتجنب الرهانات بس راح اخلي الرهان على النظام فقط /: يعني كل واحد يتفق بالدخول على السباق بـ 5 الف والجائزة تكون 10 اضعاف .. ولازم على الاقل 10 لاعبين هذا شيء اكيد ان شاء الله ان شاء الله يكون قد توقعاتك واكثر بكثير ان شاء الله1 point
-
1 point
-
----------------------------------------------------------------------------- تم تحديث الموضوع وتنسيقه اكثر: - الأنظمة المقترحة والتي سيتم العمل عليها بأذن الله :- 1- نظام السباقات الاعتيادي كما هو موضح في الصورة : 2- ( نظام السباقات الدوري ( بحيث انه يكون فيه اكثر من دورة باماكن عشوائية داخل الخريطة 3- نظام سباقات القير مثلها مثل Drag ( والي مايعرف : بحيث انك بس تبدل القير ماتهتم تلف يمين او يسار بشكل كبير والأسرع والافضل في تبديل القير يفوز ) 4- نظام سباقات الاتربة (كما هو موضح) ----------------------------------------------------------------------------- وسيتواجد نظام المهام والانجازات بحيث انك تقدر تكسب الفلوس وبعض النقاط المذكورة مسبقاً عبر هذه المهام اوالانجازات ( وطبعاً راح يكون فيه باتل باس لمهام وانجازات حصرية فقط لمشترينها حيث انهم يربحون مال مضاعف ( الجدير بالذكر ان عدد المهمات محدود لدى اصحاب الباتل باس ----------------------------------------------------------------------------- ( نستقبل اقتراحاتكم حول انظمة اخرى وجديدة )1 point
-
He does that and there will be another topic in 5 minutes that he's got a black screen after connecting. There is a file in resources "[gamemodes]/[play]/play/broph.lua", right at the top is a table of vehicles to spawn. You can remove/add vehicles there. If you don't want any vehicles to spawn replace it with an empty table: local vehiclesToSpawn = {} Don't just delete the table as it is referenced later in the code.1 point
-
خليتني اتحمس العب سيرفرك بانتظار السيرفر1 point
-
الموضوع راح يتم بدء العمل عليه في تاريخ معين ( لم يحدد بعد ) نشكركم على التصويتات وارائكم جميعاً. - راح يتم وضع اخر التطويرات على القيم مود هنا بأذن الله .1 point
-
صراحة التصميم حلو بس فيه عيوب .. 1- التفاصيل غير دقيقة ( راجع الاسلحة الحقيقية عشان تضيف تفاصيل اكثر ويطلع الشكل اجمد ) 2- العرض حق السلاح زايد ( السلاح تحسه كبير على يد اللاعب فقلل العرض قليلاً ) 3- التصويبة شكلها غير مريح او تحسه انه غير حقيقي 4- فوهة السلاح غير متناسقة ماذكرت العيوب الا عشان تتطور اكثر واكثر وبالتوفيق1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
Concordo com o que o @Lord Henry disse acima, creio que se melhorar nesses aspectos seus vídeos serão muito útil pra muita gente.1 point
-
Se o seu objetivo é dar aulas de maneira mais profissional, recomendo que compre um Pop Filter para microfone (aquelas telas que ficam na frente do microfone para impedir o ruído do sopro ao falar). Ou então vc compra um headset com microfone esponjado. E tome cuidado com o volume da voz para não ficar baixo demais. (meu caso por exemplo) Ensinar a instalar o notepad++ não é necessário. Se o usuário não sabe instalar um programa Free, então ele não será capaz de continuar. Sugiro que coloque apenas o link de download na descrição sem perder tempo com instalações. Você deverá ensinar Lógica de Programação ao usuário antes de qualquer coisa. Não é possível programar sem saber a Lógica de Programação. Você pode ensinar a Lógica direto com o MTA no notepad++, o que pode ser um desafio, pois isso não existe no YouTube BR, a maioria ensina a Lógica usando o Visualg. E ta aí um monopólio que você pode explorar, ninguém mais ensina desse jeito. Evite ficar selecionando na tela de maneira convulsiva, isso pode ser irritante para alguns usuários. Tenha sempre um roteiro para seguir e conduzir a sua videoaula, assim você não se perde e não fica enrolando com sub-assuntos. Em alguns casos, fazer animações com gráficos e imagens ajuda a entender o que você está falando e torna a videoaula mais dinâmica. Ta aí meu feedback. Espero ter ajudado. Abraço.1 point
-
mtasa://51.255.215.248:23074 http://badhabitsrpg.ml/ Discord: Click Here Our Community Staff recruitment is OPEN we are looking for loyal staff + experianced , If you are intersting to join us feel free to post you application topic in our Forum ------ About Us ------ Hello reader, and welcome to Bad Habits RPG Server! Bad Habits RPG has been around for a while and the servers main aims are to bring a fun, relaxed but well-run server. Although we’re a RPG server, the main focus is not on roleplaying. The server consists of various roleplaying groups which you can get involved with if you do enjoy roleplaying, but you can also take on other things such as being a criminal, cop, or playing as one of our many fun civilian classes like Quarry Worker and Computer Technician. Whilst being a criminal there is many things you can do to occupy your time, where public criminal groups allow you to participate in house robberies, sell weapons and drugs, rob cars, smuggle drugs into the country, whatever you want! Gangs are also an option and if you manage to join one of the big gangs, you can do special scripts such as deliveries, participate in turfing wars or fight against your sworn enemies. New gangs are also easy to set up; you can apply for a level up which means your gang can receive levels for their activity, presence in the server and overall attitude. Civilians are also an exciting part of the server and with unique and fun jobs created by the developers, what is there not to enjoy? We have quarry workers, computer technicians, news reporters, truckers, pilots, skateboarders, pizza makers, pizza delivery men, adrenaline junkies and even an ice cream man! There are much more civilian classes but we’ll leave that for you to find out. The news reporter class allows you take photographs with the camera and upload your images to the website to show off your masterpiece. Cops are also a part of the server and like criminals they can participate in House Robbery, which works off a percentage. As a cop, you must get the marker to reach the blue 100%, where as criminals much make it reach the red 100%. If it is in the red, cops fight to reduce it, if it is in the blue, criminals fight to reduce it. They can also arrest people for money as well as rank up through the department, earning extra spawns which will include more weapons depending on how many arrests you have. ---Server Rules-- ENGLISH: Here are the server rules. Breaking any of the listed rules below can be reported in the correct section in our forums and will be dealt with as fast as possible, depending on the severity. Backseat moderation is strictly prohibited. Players are expected to report and NOT decide. While playing in the server be respectful to any player/admin in the server. If you have a problem with anyone in the server, report them in the correct section in the forums; or if they are being verbal and an admin is present, bring it to there attention. If you engage in inappropriate comments but call someone else on the same thing you will also be subject to punishment. Racial remarks or derogatory comments will not be tolerated. If you notice a bug, it is your duty to report it. Not reporting a discovered bug is heavily punishable. Also abusing a bug for your own advantage is NOT allowed, even if you have already reported the bug. Officers of the law (including, but not limited to, police spawns and squads) may not fire at individuals unless their or another individual's life is in direct danger. Also, they may not fire at criminals in purpose to make arrests easier unless there is a situation, as stated earlier; where the officer's or another individual's life in direct danger. Civilians (including, but not limited to, civilian spawns and companies) may not fire at individuals unless their own life is in direct danger. However, if a civilian finds him or herself in a situation where he/she feels threatened by either a criminal or an officer of the law whom can clearly be determined as trying to arrest, only then shooting in self-defense is allowed. Criminals (including, but not limited to, criminal spawns and gangs) may only fire at individuals if they have a proper reason. This includes, but is not limited to, proper role-plays, defending themselves from officers of the law, defending themselves from a hostile enemy gang, etc. Avoiding arrest is NOT allowed. Avoiding arrest consists of killing yourself by running to a save disk and starting a new life, staying in your burning car and letting it blow up with you in it or around it, or jumping from a high distance that is high enough to kill you when you land, or drowning yourself in water. Spawn killing/Spawn Arresting is NOT allowed. Spawn arresting or spawn killing is when a player spawns and gets instantly arrested or killed by another police officer/criminal. You are allowed is to have 1 account ONLY! If you and one of your siblings play on the server using the same device, please inform an admin as fast as possible to avoid further consequences. If you own any houses or business within the server and you go inactive for more than a month, don't expect to still own your houses and business when you return. If a player goes inactive for 1 month, and another player comes along and does /lastlogin [playername] and finds that a player hasn't logged on within 30 days, they have the rights to request and buy the property and take ownership of the property. The BH HQ reserves the right to overrule any decision or rule at any time. This is here only for use in extreme situations. Main language on this server is English, you are allowed to speak your own language on the mainchat, but spamming it isn't tolerated. /cc for gang chat, PM, TeamChat and LocalChat has been brought to you to speak freely your own language. Criminals/Cops may not camp at LV Cross. This means that whenever you finished a bar brawl, you go elsewhere. Although you can still use LV Cross for RP purposes. Do not attack a police officer if he is not chasing after you (Use common sense). ---- Some Screenshots --- Don't forget to join us mtasa://51.255.215.248:23074 http://badhabitsrpg.ml/ Discord: Click Here Our Community Staff recruitment is OPEN we are looking for loyal staff + experianced , If you are intersting to join us feel free to post you application topic in our Forum Cheers, BabyDriver1 point
-
شكراً لك على تعبك , بس فيه نقطة حاب اوصلها للكل من يبي يتعلم برمجة . البرمجة مو شرط انك تشرح له وظيفة وظيفة , الشخص لا تعلم الاساسيات ويعرف يسوي الوظيفة ويكونها الويكي بيسهل له كل شيء ماشوف انها صعبه جداُ . وبالتوفيق للجميع إن شاء الله .1 point
-
1 point
-
With Render Targets, dxDrawMaterialLine3D and some animations.1 point
