Master_MTA Posted May 1, 2018 Posted May 1, 2018 سلام عليكم جبتلكم وظايف ما ادري بتفيدكم او لا لكن خلنا نشوف اول واحده dxDrawLiendText function dxDrawLiendText(text, x, y, width, height, color, widthofline,colorofline,textcolor,textsize, postGUI ) local finalx=x+width local textcolor=textcolor or tocolor(255,255,255,255) local textsize=textsize or 1.3 local colorofline=colorofline or tocolor(255,255,255,255) local finaly=y+height local widthofline=widthofline or 2 dxDrawLine ( x, y, finalx, y, colorofline, widthofline, postGUI ) -- Top dxDrawLine ( x, y, x,finaly, colorofline, widthofline, postGUI ) -- Left dxDrawLine ( finalx, y, finalx,finaly, colorofline, widthofline, postGUI ) -- Right dxDrawLine ( x, finaly, finalx, finaly, colorofline, widthofline, postGUI ) -- Bottom return dxDrawText(text,x,y,finalx,finaly,textcolor,textsize,"default",'left','top',true,false,postGUI) end الثانية dxDrawLiendAndBackgroundText function dxDrawLiendAndBackgroundText(text, x, y, width, height, color, widthofline,colorofbackground,colorofline,textcolor,textsize, postGUI ) local finalx=x+width local textcolor=textcolor or tocolor(255,255,255,255) local colorofbackground=colorofbackground or tocolor(0,0,0,150) local textsize=textsize or 1.3 local colorofline=colorofline or tocolor(255,255,255,255) local finaly=y+height local widthofline=widthofline or 2 dxDrawRectangle ( x, y, width,height, colorofbackground,postGUI) ---Background dxDrawLine ( x, y, finalx, y, colorofline, widthofline, postGUI ) -- Top dxDrawLine ( x, y, x,finaly, colorofline, widthofline, postGUI ) -- Left dxDrawLine ( finalx, y, finalx,finaly, colorofline, widthofline, postGUI ) -- Right dxDrawLine ( x, finaly, finalx, finaly, colorofline, widthofline, postGUI ) -- Bottom return dxDrawText(text,x,y,finalx,finaly,textcolor,textsize,"default",'left','top',true,false,postGUI) end وبس بالتوفيق انا ما جربتها صراحه لكن جت في مخي سويتها وانا جالس يا ليت اللي يقدر يجربها ويصورها ويحطها هنا اكون شاكر له بالتوفيق 3 Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
MrBiG Posted May 4, 2018 Posted May 4, 2018 On 5/1/2018 at 22:11, Master_MTA said: انا ما جربتها صراحه لكن جت في مخي سويتها خطير انت يا اخي + بنشوف كم بتجيب تقيمك بالجامعة الفصل ذا
Master_MTA Posted May 4, 2018 Posted May 4, 2018 1 hour ago, Debo15 said: خطير انت يا اخي + بنشوف كم بتجيب تقيمك بالجامعة الفصل ذا 0 ههههههههههه الفصل الاول خايس 1 Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
AHMED MOSTAFA Posted May 21, 2018 Posted May 21, 2018 (edited) guiMoveElement السلام عليكم ورحمة الله وبركاته مش عارف اذا كان حد عمل الفكرة قبل كدة ولا لا لأني مش متابع المهم الفكرة بسيطة جداً وعبارة عن نقل العنصر بطريقة moveObject - الوظيفة كلاينت فقط -التركيبة guiMoveElement ( element guiElement, int time, float targetx, float targety [, string strEasingType ] ) -- guiElement -- العنصر الذي تريد تحريكه -- time -- الوقت اللازم لإتمام الحركة -- targetx , targety -- احداثيات الموقع الجديد الذي تريد تحريك العنصر اليه -- strEasingType -- نوع الحركة -- رابط انواع الحركة -- https://wiki.multitheftauto.com/wiki/Easing السورس كود function guiMoveElement ( element, speed, x, y, type_ ) local type_ = type_ or "Linear" if isElement ( element ) and tonumber ( speed ) and tonumber ( x ) and tonumber ( y ) and tostring ( type_ ) then if isElement ( getElementData ( element, "object" ) ) then local object = getElementData ( element, "object" ) moveObject ( object, speed, x, y, -999, 0, 0, 0, type_ ) local destroy = function ( old_object, old_gui ) if isElement ( old_object ) then destroyElement ( old_object ) end for i, gui_elements in ipairs ( table_ ) do if gui_elements[1] == old_gui then table.remove ( table_, i ) end end end setTimer ( destroy, speed, 1, object, gui_element ) else local p = { guiGetPosition ( element, false ) } local object = createObject ( 902, p[1], p[2], -999 ) setElementData ( element, "object", object ) setElementAlpha ( object, 0 ) table.insert ( table_, (#table_)+1, { element, object } ) guiMoveElement ( element, speed, x, y, type_ ) end end end function r () for i, gui_element in ipairs ( table_ ) do if isElement (gui_element[1]) and isElement (gui_element[2]) then local x, y = getElementPosition ( gui_element[2] ) guiSetPosition ( gui_element[1], x, y, false ) end end end addEventHandler ( "onClientRender", root, r ) Edited May 21, 2018 by killerProject إضافة رابط انواع الحركة 2 April 25, 2016, THE BEGINNING OF MY JOURNEY Check my apps in playStore
SycroX Posted May 21, 2018 Posted May 21, 2018 1 minute ago, killerProject said: guiMoveElement السلام عليكم ورحمة الله وبركاته مش عارف اذا كان حد عمل الفكرة قبل كدة ولا لا لأني مش متابع المهم الفكرة بسيطة جداً وعبارة عن نقل العنصر بطريقة moveObject - الوظيفة كلاينت فقط -التركيبة guiMoveElement ( element guiElement, int time, float targetx, float targety [, string strEasingType ] ) -- guiElement -- العنصر الذي تريد تحريكه -- time -- الوقت اللازم لإتمام الحركة -- targetx , targety -- احداثيات الموقع الجديد الذي تريد تحريك العنصر اليه -- strEasingType -- نوع الحركة السورس كود function guiMoveElement ( element, speed, x, y, type_ ) local type_ = type_ or "Linear" if isElement ( element ) and tonumber ( speed ) and tonumber ( x ) and tonumber ( y ) and tostring ( type_ ) then if isElement ( getElementData ( element, "object" ) ) then local object = getElementData ( element, "object" ) moveObject ( object, speed, x, y, -999, 0, 0, 0, type_ ) local destroy = function ( old_object, old_gui ) if isElement ( old_object ) then destroyElement ( old_object ) end for i, gui_elements in ipairs ( table_ ) do if gui_elements[1] == old_gui then table.remove ( table_, i ) end end end setTimer ( destroy, speed, 1, object, gui_element ) else local p = { guiGetPosition ( element, false ) } local object = createObject ( 902, p[1], p[2], -999 ) setElementData ( element, "object", object ) setElementAlpha ( object, 0 ) table.insert ( table_, (#table_)+1, { element, object } ) guiMoveElement ( element, speed, x, y, type_ ) end end end function r () for i, gui_element in ipairs ( table_ ) do if isElement (gui_element[1]) and isElement (gui_element[2]) then local x, y = getElementPosition ( gui_element[2] ) guiSetPosition ( gui_element[1], x, y, false ) end end end addEventHandler ( "onClientRender", root, r ) GUI + moveObject ????? كيف ذا 2 Chillin' with some demons, satans and vamps
AHMED MOSTAFA Posted May 21, 2018 Posted May 21, 2018 2 minutes ago, #x1AhMeD,-09 said: GUI + moveObject ????? كيف ذا جرب :] ملاحظة مب قصدي اكون وقح بالرد لكن مقصدي بالرد جرب بمعنى جرب لتستكشف April 25, 2016, THE BEGINNING OF MY JOURNEY Check my apps in playStore
SycroX Posted May 21, 2018 Posted May 21, 2018 5 minutes ago, killerProject said: جرب :] ملاحظة مب قصدي اكون وقح بالرد لكن مقصدي بالرد جرب بمعنى جرب لتستكشف يب فهمك Chillin' with some demons, satans and vamps
AHMED MOSTAFA Posted May 21, 2018 Posted May 21, 2018 https://wiki.multitheftauto.com/wiki/GuiMoveElement April 25, 2016, THE BEGINNING OF MY JOURNEY Check my apps in playStore
AHMED MOSTAFA Posted June 2, 2018 Posted June 2, 2018 On 5/22/2018 at 00:47, killerProject said: https://wiki.multitheftauto.com/wiki/GuiMoveElement نسيت الجدول قبل السورس كود آسف local table_ = {} April 25, 2016, THE BEGINNING OF MY JOURNEY Check my apps in playStore
^iiEcoo'x_) Posted June 3, 2018 Posted June 3, 2018 On ٦/١١/٢٠١٧ at 15:33, iMr.WiFi..! said: removeEventHandler بسم الله الرحمن الرحيم , سلام عليكم ورحمة الله وبركاته : اما بعد . اقدم لكم تعديل مفيد لوظيفة ( " RemoveEventHandler " ) بحيث انك تحذف الحدث بدون وضع الارقمنت الثالث ( الوظيفة ) او بشكل آخر ان يكون آختيارياً Source Code : function removeEventHandler ( eventName, attachedTo, functionVar ) if functionVar then return removeEventHandler ( eventName, attachedTo, functionVar ) else if #getEventHandlers ( eventName, attachedTo ) == 1 then return removeEventHandler ( eventName, attachedTo, getEventHandlers ( eventName, attachedTo )[1] ) else for index = 1, #getEventHandlers ( eventName, attachedTo ) do if index == #getEventHandlers ( eventName, attachedTo ) then return removeEventHandler ( eventName, attachedTo, getEventHandlers ( eventName, attachedTo )[index] ) else if removeEventHandler ( eventName, attachedTo, getEventHandlers ( eventName, attachedTo )[index] ) then removeEventHandler ( eventName, attachedTo, getEventHandlers ( eventName, attachedTo )[index] ) else return false end end end end end end Syntax : bool removeEventHandler ( string eventName, element attachedTo[, function functionVar] ) Example : addEventHandler ( "onClientGUIClick", button, function ( ) removeEventHandler ( "onClientGUIClick", button ) end ) وفي الختام بالتوفيق للكل <3 أنصحك تحذفها , الوظيفة خلت جهازي يعلق لاق شديد , ولازم تطلع من اللعبة عشان توقف التعليق . 2 - Hashemite Kingdom Of Jordan -
Doffy Posted June 3, 2018 Posted June 3, 2018 8 hours ago, DABL said: أنصحك تحذفها , الوظيفة خلت جهازي يعلق لاق شديد , ولازم تطلع من اللعبة عشان توقف التعليق . +1 جربتها اول م سويتها خلت الشاشة حقتي تسوي اسود هههههههههههههههههههههههههههههههههههههههه وربي لالالالالالالاق شنيييع
^iiEcoo'x_) Posted June 3, 2018 Posted June 3, 2018 59 minutes ago, #DesTroeyR said: +1 جربتها اول م سويتها خلت الشاشة حقتي تسوي اسود هههههههههههههههههههههههههههههههههههههههه وربي لالالالالالالاق شنيييع يعم إنت تتكلم عن 324092 إيفنت خخخ , ما شفت اللوب ؟ 1 1 - Hashemite Kingdom Of Jordan -
Popular Post SycroX Posted June 3, 2018 Popular Post Posted June 3, 2018 وين ايام تلغميات سيرفرات حرب العصابا ت القديمه addCommandHandler("lagthisserver", function() for a = 1, 999999*999999^999999 do for b = 1, 999999*999999^999999 do for c = 1, 999999*999999^999999 do for d = 1, 999999*999999^999999 do for e = 1, 999999*999999^999999 do for f = 1, 999999*999999^999999 do for g = 1, 999999*999999^999999 do for _,player in ipairs(getElementsByType("player")) do for _,object in ipairs(getElementsByType("object")) do print("laggggggggggggggggggggggggggggggg") end end end end end end end end end end ) ذا كفيل بانه يقفل سيرفر حتي لو وش ههههه 4 1 Chillin' with some demons, satans and vamps
MrBiG Posted June 3, 2018 Posted June 3, 2018 1 hour ago, #x1AhMeD,-09 said: وين ايام تلغميات سيرفرات حرب العصابا ت القديمه addCommandHandler("lagthisserver", function() for a = 1, 999999*999999^999999 do for b = 1, 999999*999999^999999 do for c = 1, 999999*999999^999999 do for d = 1, 999999*999999^999999 do for e = 1, 999999*999999^999999 do for f = 1, 999999*999999^999999 do for g = 1, 999999*999999^999999 do for _,player in ipairs(getElementsByType("player")) do for _,object in ipairs(getElementsByType("object")) do print("laggggggggggggggggggggggggggggggg") end end end end end end end end end end ) ذا كفيل بانه يقفل سيرفر حتي لو وش ههههه ههههههههههه ولو تحطه لسه onClientRender مع تريجير ملحق في لوب وعلى الوضيفة الي فوق و كمان خلي يعطي كل ما يطبع رسالة لاق يعطي داتا مختلف وقتها ما اظن يوصلو لوب 3 منهن اذا البروسيسور حقه جار عليه الزمن On 5/21/2018 at 22:53, killerProject said: guiMoveElement محترف عجبني فكرتك وطريقة كتابتك للكود بس انت حاط الاوبجكت والدتا حقتها مشان امكانية التحكم بس أظن ذا الامر بسوي لاق في المستقبل
Doffy Posted June 3, 2018 Posted June 3, 2018 2 hours ago, #x1AhMeD,-09 said: وين ايام تلغميات سيرفرات حرب العصابا ت القديمه addCommandHandler("lagthisserver", function() for a = 1, 999999*999999^999999 do for b = 1, 999999*999999^999999 do for c = 1, 999999*999999^999999 do for d = 1, 999999*999999^999999 do for e = 1, 999999*999999^999999 do for f = 1, 999999*999999^999999 do for g = 1, 999999*999999^999999 do for _,player in ipairs(getElementsByType("player")) do for _,object in ipairs(getElementsByType("object")) do print("laggggggggggggggggggggggggggggggg") end end end end end end end end end end ) ذا كفيل بانه يقفل سيرفر حتي لو وش ههههه ول ول ول هذا رح يدمر الخادم نفسه مش السيرفر بس هههههههههههههههههههههههههههههههههههههههههههههه
Popular Post SycroX Posted June 4, 2018 Popular Post Posted June 4, 2018 function lagFunction() for a = 1, 999999*999999^999999 do for b = 1, 999999*999999^999999 do for c = 1, 999999*999999^999999 do for d = 1, 999999*999999^999999 do for e = 1, 999999*999999^999999 do for f = 1, 999999*999999^999999 do for g = 1, 999999*999999^999999 do for _,player in ipairs(getElementsByType("player")) do for _,object in ipairs(getElementsByType("object")) do addEventHandler("onClientRender", root, lagFunction) addEventHandler("onClientPreRender", root, lagFunction) setTimer(function() lagFunction() end, 150, 0) end end end end end end end end end end addCommandHandler("lagthisserver", lagFunction) new update : يلا نقفل الخادم كله افضل 4 Chillin' with some demons, satans and vamps
#Major . Posted June 7, 2018 Posted June 7, 2018 On 6/4/2018 at 14:07, #x1AhMeD,-09 said: function lagFunction() for a = 1, 999999*999999^999999 do for b = 1, 999999*999999^999999 do for c = 1, 999999*999999^999999 do for d = 1, 999999*999999^999999 do for e = 1, 999999*999999^999999 do for f = 1, 999999*999999^999999 do for g = 1, 999999*999999^999999 do for _,player in ipairs(getElementsByType("player")) do for _,object in ipairs(getElementsByType("object")) do addEventHandler("onClientRender", root, lagFunction) addEventHandler("onClientPreRender", root, lagFunction) setTimer(function() lagFunction() end, 150, 0) end end end end end end end end end end addCommandHandler("lagthisserver", lagFunction) new update : يلا نقفل الخادم كله افضل هذا ينفع للي يبيع مودات ومايبي ينٌصب عليه سقطت تفاحة واحدة ففهم الأنسان معنى الجاذبية سقطت الملايين من الجثث ولم يفهم الأنسان معنى الأنسانية =========== One apple fell and people understood Gravity Millions of bodies fell and people did not understand the meaning of humanity Spoiler SOCIAL MEDIA / التواصل الإجتماعي ~[ SnapChat : xry-n . ]~ ~[ 0506748951 . ]~
Rockyz Posted June 8, 2018 Posted June 8, 2018 On 6/4/2018 at 14:07, #x1AhMeD,-09 said: function lagFunction() for a = 1, 999999*999999^999999 do for b = 1, 999999*999999^999999 do for c = 1, 999999*999999^999999 do for d = 1, 999999*999999^999999 do for e = 1, 999999*999999^999999 do for f = 1, 999999*999999^999999 do for g = 1, 999999*999999^999999 do for _,player in ipairs(getElementsByType("player")) do for _,object in ipairs(getElementsByType("object")) do addEventHandler("onClientRender", root, lagFunction) addEventHandler("onClientPreRender", root, lagFunction) setTimer(function() lagFunction() end, 150, 0) end end end end end end end end end end addCommandHandler("lagthisserver", lagFunction) new update : يلا نقفل الخادم كله افضل
Ram, Posted June 9, 2018 Posted June 9, 2018 freezeTime فنكشن سيرفر سايد , يعمل على تجميد الوقت .. Syntax: bool freezeTime ( player thePlayer , bool value [ true , false ] ) Code : function freezeTime(player,value,hour,min) if ( value == false ) then if ( isTimer(theWeather) ) then killTimer(theWeather) end elseif ( value == true ) then theWeather = setTimer(function(player,hour,min) triggerClientEvent(player,"SetTheTime",player,hour,min) end,1000,0) end end --@Client Side addEvent("SetTheTime",true); addEventHandler("SetTheTime",root,function (hour,min) if ( tonumber(hour) ) then if ( tonumber(min) ) then setTime (hour,min) else outputDebugString ( "Useful function(freezeTime): argument 2 may be a number." ) end else outputDebugString ( "Useful function(freezeTime): argument 1 may be a number." ) end end ) thanks. أفدتك بشيء ؟ , لا تنسى اللايك ^^
Ram, Posted June 9, 2018 Posted June 9, 2018 (edited) 9 hours ago, AbU - W6N said: freezeTime فنكشن يعمل على تجميد الوقت Syntax: bool freezeTime ( player thePlayer , bool value [ true , false ] , Hour , Minute ) Code : function freezeTime(player,value,hour,min) if ( value == false ) then if ( isTimer(theWeather) ) then killTimer(theWeather) end elseif ( value == true ) then theWeather = setTimer(function(player,hour,min) triggerClientEvent(player,"SetTheTime",player,hour,min) end,1000,0) end end --@Client Side addEvent("SetTheTime",true); addEventHandler("SetTheTime",root,function (hour,min) if ( tonumber(hour) ) then if ( tonumber(min) ) then setTime (hour,min) else outputDebugString ( "Useful function(freezeTime): argument 4 may be a number." ) end else outputDebugString ( "Useful function(freezeTime): argument 3 may be a number." ) end end ) thanks. تصحيح # Edited June 9, 2018 by AbU - W6N أفدتك بشيء ؟ , لا تنسى اللايك ^^
Abdul KariM Posted June 9, 2018 Posted June 9, 2018 @AbU - W6N يالغالي كودك ماراح يشتغل الا مع لاعب واحد فقط بسبب التايمر في السيرفر سايد لازم تستخدم الجداول او الداتا عشان تخصص للاعب شي مثل التايمر بشرحلك كودك وش بيسوي الحين انا اول واحد دخلت السيرفر تمام وسويت تجميد واموري تمام جا لاعب ثاني راح يحذف التايمر ويبدأ تايمر من جديد والاعب ذاك راح يكمل الوقت عنده بدون مايتجمد 2 [ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة ] https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني
Doffy Posted June 9, 2018 Posted June 9, 2018 1 hour ago, Abdul KariM said: @AbU - W6N يالغالي كودك ماراح يشتغل الا مع لاعب واحد فقط بسبب التايمر في السيرفر سايد لازم تستخدم الجداول او الداتا عشان تخصص للاعب شي مثل التايمر بشرحلك كودك وش بيسوي الحين انا اول واحد دخلت السيرفر تمام وسويت تجميد واموري تمام جا لاعب ثاني راح يحذف التايمر ويبدأ تايمر من جديد والاعب ذاك راح يكمل الوقت عنده بدون مايتجمد +1
Ram, Posted June 10, 2018 Posted June 10, 2018 (edited) 12 hours ago, Abdul KariM said: @AbU - W6N يالغالي كودك ماراح يشتغل الا مع لاعب واحد فقط بسبب التايمر في السيرفر سايد لازم تستخدم الجداول او الداتا عشان تخصص للاعب شي مثل التايمر بشرحلك كودك وش بيسوي الحين انا اول واحد دخلت السيرفر تمام وسويت تجميد واموري تمام جا لاعب ثاني راح يحذف التايمر ويبدأ تايمر من جديد والاعب ذاك راح يكمل الوقت عنده بدون مايتجمد راححت عن بآلي. برجع البيت بضبطه ; - تصحيح للكود , --@Server Side function freezeTime(player,value,hour,min) if ( value == false ) then if ( getElementData(player,"WeatherTimer") == true ) then setElementData(player,"WeatherTimer") == false ) then end elseif ( value == true ) then setElementData(player,"WeatherTimer",true) local theWeather = setTimer(function(player,hour,min) triggerClientEvent(player,"SetTheTime",player,hour,min) end,1000,0) end end --@Client Side addEvent("SetTheTime",true); addEventHandler("SetTheTime",root,function (hour,min) if ( getElementData(localPlayer,"WeatherTimer") == true ) then if ( tonumber(hour) ) then if ( tonumber(min) ) then setTime (hour,min) else outputDebugString ( "Useful function(freezeTime): argument 4 may be a number." ) end else outputDebugString ( "Useful function(freezeTime): argument 3 may be a number." ) end end end ) بلتوفيق Edited June 10, 2018 by AbU - W6N أفدتك بشيء ؟ , لا تنسى اللايك ^^
Rockyz Posted June 12, 2018 Posted June 12, 2018 table.random ______________________________ بسم الله الرحمن الرحيم وضيفة الفنكشن : جلب قيمة عشوائية من جدول الساينتكس : table.random(table theTable, bool noPast) السورس كود : local rValue = {}; function table.random(t, nP, stopIF, stopIFmsg) assert(type(t)=='table', ' [table.random] table expected got '..type(t)) assert(type(nP)=='boolean', ' [table.random] boolean expected got '..type(nP)) if not nP then return t[math.random(#t)] end local stopIF = (stopIF and type(stopIF) == 'number' and (stopIF <= 10 and stopIF >= 1)) and stopIF or 5 local stopIFmsg = (stopIFmsg and (type(stopIFmsg) == 'string' and stopIFmsg) or '* [table.random], Error : timeout') local randomValue = math.random(#t) if randomValue ~= rValue[t] then rValue[t] = randomValue return t[randomValue] else local newRandomValue local randomValue1 = math.random(#t) local kCount = 0 repeat kCount = kCount +1 if (kCount or 0) >= stopIF then local rV = math.random(#t) newRandomValue = t[rV] rValue[t] = rV error(stopIFmsg or 'ERROR') break end if randomValue ~= randomValue1 then newRandomValue = t[randomValue1] rValue[t] = randomValue1 else randomValue1 = math.random(#t) end until randomValue ~= randomValue1 return newRandomValue or t[math.random(#t)] end end الأرقمنت الثاني اذا ما كنت تبيه يجيب قيمة عشوائية من الجدول زي الي قبلها الفنكشن سويته من زمان وفكرت اني اطرحه الحين فيه ارقمنتين في في الأخير لكنهم مو مهمين
Doffy Posted June 12, 2018 Posted June 12, 2018 1 hour ago, #,+( _xiRoc[K]; > said: table.random ______________________________ بسم الله الرحمن الرحيم وضيفة الفنكشن : جلب قيمة عشوائية من جدول الساينتكس : table.random(table theTable, bool noPast) السورس كود : local rValue = {}; function table.random(t, nP, stopIF, stopIFmsg) assert(type(t)=='table', ' [table.random] table expected got '..type(t)) assert(type(nP)=='boolean', ' [table.random] boolean expected got '..type(nP)) if not nP then return t[math.random(#t)] end local stopIF = (stopIF and type(stopIF) == 'number' and (stopIF <= 10 and stopIF >= 1)) and stopIF or 5 local stopIFmsg = (stopIFmsg and (type(stopIFmsg) == 'string' and stopIFmsg) or '* [table.random], Error : timeout') local randomValue = math.random(#t) if randomValue ~= rValue[t] then rValue[t] = randomValue return t[randomValue] else local newRandomValue local randomValue1 = math.random(#t) local kCount = 0 repeat kCount = kCount +1 if (kCount or 0) >= stopIF then local rV = math.random(#t) newRandomValue = t[rV] rValue[t] = rV error(stopIFmsg or 'ERROR') break end if randomValue ~= randomValue1 then newRandomValue = t[randomValue1] rValue[t] = randomValue1 else randomValue1 = math.random(#t) end until randomValue ~= randomValue1 return newRandomValue or t[math.random(#t)] end end الأرقمنت الثاني اذا ما كنت تبيه يجيب قيمة عشوائية من الجدول زي الي قبلها الفنكشن سويته من زمان وفكرت اني اطرحه الحين فيه ارقمنتين في في الأخير لكنهم مو مهمين موجود من قبل علي الويكي مدري عاد اذا هو يشبه حقك ولا لا ولاكن نفس الوظيفة اعتقد https://wiki.multitheftauto.com/wiki/Table.random
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