Mhmd.z Posted August 28, 2015 Share Posted August 28, 2015 السلام عليكم ورحمة الله وبركاته سؤال عن ال Useful Functions الحين ذا وش معناه؟ يعني لاعبين يسوون كود ولا وش؟ Link to comment
Naif Posted August 28, 2015 Share Posted August 28, 2015 وظائف مفيدة , يعني تفيدك بشيء .. Link to comment
Mhmd.z Posted August 28, 2015 Author Share Posted August 28, 2015 طيب هذي يعني في اشخاص يسوون الاكواد ؟ لآنه ينكتب Author: Link to comment
Naif Posted August 28, 2015 Share Posted August 28, 2015 يب هم يسسون وظائف ويحطونها بـ Useful Functions Link to comment
Jupi Posted August 28, 2015 Share Posted August 28, 2015 هذه فنكشنات مفيدة من صنع مبرمجين (لاعبين) تاخذ الكود و تحطه بسكربتك و تستعمله كأنه فنكشن طبيعي من اللعبة Link to comment
Mhmd.z Posted August 28, 2015 Author Share Posted August 28, 2015 كيف يعني يصنع الفنكشن ؟ مثلا في SetElementSpeed Link to comment
iMr.SFA7 Posted August 28, 2015 Share Posted August 28, 2015 Useful Functions = هي فنكشات مفيدة تسآعدك على الآختصآر setElementSpeed كـ مثآل الوظيفة الي حطيتها الوظيفة هذي تحط سرعة محدد للألمنت الي تحدده أنت مع ضرب وقسمة وحوسة setElementVelocityمع getElementVelocity طبعاً هـ الوظيفة تسآعدك اذا كنت تبي تستخدمها بدل لا تستخدم الوظائف هـ الوظيفة رآح تسآعدكك وكذآلكك هنآلك الكثير من الوظائف التي من الممكن أن تسآعدكك https://wiki.multitheftauto.com/wiki/Useful_Functions Link to comment
Rockyz Posted August 31, 2015 Share Posted August 31, 2015 Useful Functions = هي فنكشات مفيدة تسآعدك على الآختصآرsetElementSpeed كـ مثآل الوظيفة الي حطيتها الوظيفة هذي تحط سرعة محدد للألمنت الي تحدده أنت مع ضرب وقسمة وحوسة setElementVelocityمع getElementVelocity طبعاً هـ الوظيفة تسآعدك اذا كنت تبي تستخدمها بدل لا تستخدم الوظائف هـ الوظيفة رآح تسآعدكك وكذآلكك هنآلك الكثير من الوظائف التي من الممكن أن تسآعدكك https://wiki.multitheftauto.com/wiki/Useful_Functions ^ + لازم تخلي الكود المهم مثلا لفنكشن setElementSpeed وهذا الكود المهم حقه ادا ماخليته مايشتغل الكود بالكامل function setElementSpeed(element, unit, speed) if (unit == nil) then unit = 0 end if (speed == nil) then speed = 0 end speed = tonumber(speed) local acSpeed = getElementSpeed(element, unit) if (acSpeed~=false) then -- if true - element is valid, no need to check again local diff = speed/acSpeed if diff ~= diff then return end -- if the number is a 'NaN' return end. local x,y,z = getElementVelocity(element) setElementVelocity(element,x*diff,y*diff,z*diff) return true end return false end او مثلا isMouseInPosition هذا حق تأثير للدي اكس او وضائف اخرة عديدة و هذا الكود المهم حقه function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing ( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end 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