Jump to content

coNolel

Members
  • Posts

    718
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by coNolel

  1. 2 hours ago, ABU.OMAR</> said:

    hey guys I'm trying to make a script that checks if the player is in the car and then tells the player that he's in a car, but it doesn't work, what can i do?.

     

    I want the script to work through command I don't want events.

     

    Code :

    function insideCar( source , player )
       		local pos = getElementPosition(getLocalPlayer(player))     
    			if  isPlayerInVehicle(pos) then
         outputChatBox("You're in the car"..getPlayerName(source), source)
      else 
            outputChatBox("You're on foot", source)
        end
              end
    addCommandHandler("check",insideCar)

    thanks.

    I think comments aobve me already answered your question, but i suggest you to re-visit LUA and scripting basics, since in your code you have to parameters, the first is source and the second is player, but in this case the source and the play are the same thing.

    • Like 2
  2. 3 minutes ago, scolen said:
    progressBar = guiCreateProgressBar(0.03, 0.96, 0.1, 0.02, true, nil,nil,22)
     guiProgressBarSetProgress(progressBar, 100)

     

    It seems like guiCreateProgressBar is a built-in function in MTA SA lib, I suggest you to use the "dx" version, you can also modify it in order to suite your server ( position, colors,  background, borders etc....)

    https://wiki.multitheftauto.com/wiki/DxDrawProgressBar

    Good Luck.

  3. السلام عليكم،

    لا أظن أن لعب MTA:SA 

    رح يبقى شغال من الـVM MACHINES 

    بناءً على آخر Announcement 

    نزلوه بسيرفر ديسكورد 

    Quote

    @everyone We have an announcement to make regarding certain services and technologies, like "Cloud Gaming" platforms and various cloud / cloud VM and hypervisor based services and software. Unfortunately, the majority of such services can no longer be used with MTA starting today. After observing a growing trend of abuse, such as server ban evading (serials related) we have enabled the same type of security, known as MTA serial verification - which usually applies to the most common consumer VM software - to all VM types and cloud services that we know of. This means that the procedure from https://updatesa.multitheftauto.com/sa/trouble/?tr=serial-validation must be followed on all relevant services, not just the aforementioned. Because most cloud & VM hosting services won't provide users access to the host machine (that hosts the VM), we expect that most "cloud gaming" users will no longer be able to play MTA using said service. Not that MTA is an attractive game to play in cloud gaming though, we advise you to use MTA like a normal user (on your own PC) and understand that we care about servers being able to reliably ban players. Cloud gaming, for instance.. would constantly offer you a new so-called environment, allowing infinite serial swaps, making you hard to ban. It's possible for some people still being able to use relevant services, as these measures will only apply to newly generated MTA serials (not retroactively). This is intended.

    يا ريت اذا فهمت غلط أحد يصحح لي المعلومة و شكرا.

  4. On 22/09/2020 at 18:34, xLive said:

    مالي دخل بالموضوع صراحة

    لكن إذا نشرت شي و واحد استعمله بسيرفر ماتقدر تطلق عليه " سرقة " ليه ناشره اصلًا؟

    لو ماتبي احد يعدله تقدر تحط رخصة إستخدام بالمود وهنا اقول لك حق لأن ذا إنتهاك بس ماتوقع انك كاتب شيء

    انت بنفسك اعتقد شايل رخصة الإستخدام حقت التصميم نفسه يلي مفروض ماتشيلها


     

    اسكت انت

  5. On 05/10/2019 at 11:08, [KilleR] said:

    السلام عليكم

    الحين لو عندي شكل بحطها على موتر يكون تكسد ولا دفف وكيف الطريقة يعني

    مثلا عندي سيارة فلعبة ثانية بحطها mta

    كيف اجيبها واستبدلها بسيارة غيرها كيف تكسد ولا دفف والطريقه والبرامج الله لايهينك الي يعرف

    وش تقصد ب تبي تحطها ؟ إبحث عن الفرق بين txd , dff 

    وتعال حياك 

  6. On 21/09/2019 at 23:11, xFabel said:

    مشكور علي رد

    سويت كذا وصارت سريعه ؟ كيف ابطئ

    
    local math_min = math.min
    local movingX = 0
    
    addEventHandler("onClientRender", root,
        function()
    	local tick = getTickCount()
    	movingX, movingY = interpolateBetween(10, 0, 0, 0, 0, 0, math_min(movingX+0.02), "Linear")
            dxDrawImage(x * (1213/sx) + movingX, y * (645/sy), x * (57/sx), y * (57/sy), ":guieditor/images/cross.png", 0, 0, 0, tocolor(14, 17, 19, 255), false)
            dxDrawImage(x * (1146/sx) + movingX, y * (645/sy), x * (57/sx), y * (57/sy), ":guieditor/images/cross.png", 0, 0, 0, tocolor(14, 17, 19, 255), false)
            dxDrawImage(x * (1225/sx), y * (659/sy), x * (30/sx), y * (30/sy), ":guieditor/images/reset.png", 0, 0, 0, tocolor(0, 102, 255, 255), false)
            dxDrawImage(x * (1159/sx), y * (659/sy),x * (30/sx)+width, y * (30/sy)+height, ":guieditor/images/plus.png", 0, 0, 0, tocolor(102, 204, 153, 255), false)
        end
    )
    

    مفهمتك وش تقصد هنا؟

    العداد = tick

     

  7. On 20/09/2019 at 19:17, xFabel said:

    ذا كود من صنعي حاولت اسوي تجربه ب تحريك صوره موشن بس ماتتحرك حد يفهمني سالفه؟ ولاحد يعطني كود كامل ابغى افهم كيف تتحرك صوره

    
    addEventHandler("onClientRender", root,
        function()
    	local tick = getTickCount()
    	height, width = interpolateBetween(0, 0, 0, 0, 10, 0, tick, "Linear")
            dxDrawImage(x * (1213/sx), y * (645/sy), x * (57/sx), y * (57/sy), ":guieditor/images/cross.png", 0, 0, 0, tocolor(14, 17, 19, 255), false)
            dxDrawImage(x * (1146/sx), y * (645/sy), x * (57/sx), y * (57/sy), ":guieditor/images/cross.png", 0, 0, 0, tocolor(14, 17, 19, 255), false)
            dxDrawImage(x * (1225/sx), y * (659/sy), x * (30/sx), y * (30/sy), ":guieditor/images/reset.png", 0, 0, 0, tocolor(0, 102, 255, 255), false)
            dxDrawImage(x * (1159/sx), y * (659/sy),x * (30/sx)+width, y * (30/sy)+height, ":guieditor/images/plus.png", 0, 0, 0, tocolor(102, 204, 153, 255), false)
        end
    )
    

     

    أول شيء بالأول ، حاول تسويها ب متغيرات بالأرقام ، بعدها سويها ب العداد getTickCount()

  8. On 16/09/2019 at 02:13, PixelAisar01 said:

    سلام عليكم احنا العرب لازم نجتمع و نطور عشان  كل العرب صارو  يقارنون نفسهم بلاجانب

    المهم شباب المبرمج ولا شخص متنظم يكلمني ديسكورد 

    PixelAisar#8279

    اتمني من كل العرب يجون ويكلموني خاص عشان نفتح سيرفر اسطوري ونعلم  الاجانب انو احنا اقوي منه

    ( للي مافهم احنا نبي نجمع المبرمجين العرب و المنظمين و الادارة لي سيرفر رول بلاي )

    اذا انت تبي تعال ?

    عليكم السلام ورحمة الله تعالى وبركاته ، يا أخوي فعلا الفكرة طرحت كذا مرة 2016 - 2017

    لكن ما يكمل السيرفر عشان يصيرون المبرمجين Inactive :)

     

  9. 5 hours ago, NotAnyOne said:

    مشكور اخوي فهمت بعض الاشياء

    بس هذا سطر

    local name = getPlayerName(localPlayer):gsub('#%x%x%x%x%x%x', '')

     

    :gsub('#%x%x%x%x%x%x', - ذا الامر وش وظيفته

    على حسب اللي أعرف، أنه gsub

    هي substitution )هذي طريقتي السحرية عشان أحفظ وأفهم الفنكشنات ههه(

    يعني تصلح ل تغيير  مثلا كلمة ب كلمة أخرى في جملة 

    مثال

    = string.gsub("Hello banana", "banana", "Lua user")
    Hello Lua user

     

    Note: ما جبت شي من عندي والله

    أنصحك تروح تتعلم Lua 

    ويوم نرجع صدقني بيجيك كل شي سهل ان شاء الله

  10. 6 minutes ago, NotAnyOne said:

    لا حؤل ولا قوة الا بالله 

    يخوي  موضوعي واضح  طلب شرح للقريد ليست ما قلت شرح لوب او شيء ثاني واذا غلطت مع احد يكون بدون قصد وانا اعتذر 

    ومشكور اذا كنت تبي تساعدني

    لاهنتم لا احد يطلع خارج سياق الموضوع

    يمكن تستفيد

  11. سلام عليكم كيفك صديقي

    الـ

    while do

    هي زيها زي أي loop  ثانية،

    while = ما دام أن

    do = قم بالأمر التالي

    ما أنصحك تجرب

    while true do
      print('Lua')
    end

    لأن  ما دام السكربت شغال بتقعد تكتب لك Lua إلى يوم القيامة هههه

    تقدر تستعمل break

    مثال آخر عشان تفهم

    local conolel = 0
    
    while conolel <= 10 do -- مادام قيمة conolel أصغر من 10 بيسوي الأمر الجاي
      conolel = conolel + 1 -- الأمر هو أنه يضيف ل conolel 1 كل مرة حتى أصير أصغر أو أساوي 10
      print(tostring(conolel))
    end

    في هذا المثال ، يوم توصل قيمة conolel إلى 11

    بيوقف الـ loop حقت while

    أتمنى يكون الشرح بسيط و  ما فيه أخطاء لأني ساحب شوي

    • Haha 1
×
×
  • Create New...