Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 19/05/19 in all areas

  1. بحاول أشرحلك كود أوسكار لكن احذرك انا سيء بالشرح م اعرف حتى اشرح كيف تشغل الحاسوب .جيبلك الوقت اللي قاعد وانت تستخدم فيه الجهاز بالميلي سيكند . ونستعملها احسن لأنه عدد متحرك ورح اشرحلك ليه نحتاج عدد متحركgetTickCount أولا وظيفة ثانية = 1000 ميليسيكند start = getTickCount() هذي هو حطها بالبداية حتى تجيبله وقته وهو مستعمل الجهاز وحطها خارج الرندر حتى تكون ثانبتة now أيضا تجيبلك الوقت لكن الحالي اسمها ناو لأنها داخل الرندر يعني الوقت قاعد يمشي معك progress = now - start = 0 | الإثنين نفس الرقم رح يعطيك 0 وبما ان ناو متحرك رح يعيد يعد من الصفر ويصعد الحين نقسم على 1000 لأن الأرقمن حق الانتروبولات يطلب عدد من 0 الى 1 ووظيفتنا التيك كاونت تعطيك عدد فوق 1000 لذا 1000 قسمة 1000 يساوي 1 progress = (now - start) /1000 (كان قادر يسوي هيك بس مدري ليه ينقص ويزيد ض) الأقواص ضرورية لأن الأولية للأقواص ينقص ثم يقسم بدون أقواص رح يقسم على العدد اللي قبله نقسم على 1000 عشان يبدأ يعد من 0.000 الأنيميشن تخلص لما العدد يوصل ل1 وبما أن كلشي موجود برندر فما رح يتوقف العد والعدد رح يعيد من 0 الى 1 في حلقة غير منتهية عشان هيك الأنيميشن ماتخلص نرجع ليه قسمنا على 1000 بالضبط عشان العد يوصل ل1 في ثانية واحدة واذا تجرب الكود رح تشوف الأنيميشن تطلع وترجع كل ثانية . فإذا حبيت الحركة تكون ابطأ مثلا كل ثانتين تقسم على 1600 تقريبا الخ واذا اردت اسرع تقسم على عدد أقل وبالنسبة للكود للي اضفته انا عشان توقف الحركة if now - start >= 5000 then اذا وصل العد ل5000 يتوقف او اي شي تبيه و5000 تعني 5 ثواني طبعا البرمجةة كلها ريضايات مافي شي معقد مع الممارسة يتوصح كلشي بالنسبة للوظيفة نفسها سهلة جدا مسوي شرح لها يارب تقدر تفهم ض1 شرحتلك جزء فقط وان شاء الله تكون فهمت كل هذا الشي نقدر نسويه بالمتغيرات لكن الشغل رح يكون أطول لذا من الأحسن هذا
    2 points
  2. بسم الله الرحمن الرحيم السلام عليكم ورحمه الله وبركاته اليوم معانا مود جديد المود عبارة عن : 1 - عاجل 2 - مع لوق 3 - تقدر تكتب مكان اسمك فيه اسم عربي *للمعلومة السكربت مو موجود بأي سيرفر غير سيرفرات* @MR.Mosa @MR.S3D @MrKAREEM صور المود : صورة لوحة التحكم في اسم العاجل : " رابط التحميل " ❃ ⌠ رابط التحميل هنا ⌡ ❃ الاهدائات : @!#DesTroyeR_,) @MrKAREEM @Mr.Falcon @DABL @KillerX @NX_CI @[AcM] - Major . @MR_Mahmoud @Ahmed Ly @MR.Mosa @+Source|> @Abu-Solo @SuperX @Mr.CnTroL والسلام عليكم ورحمه الله وبركاته تحياتي : *Kareem Amer*
    1 point
  3. Claro que está faltando. Vc não colocou o parâmetro de função para associar o ID do player nele. function ConfiscarArmas (player, commandName, playerid)
    1 point
  4. ابداع لايمكن وصفه واصل تحياتي : كنترول ابدعت يامستر موسى : )))))) جاري تحميل ......
    1 point
  5. E esse tópico está na seção de Tutoriais, da próxima vez poste na seção adequada de Programação em Lua.
    1 point
  6. Está dando errado pq vc está usando o parâmetro de função errado. Os parâmetros de função do evento onElementModelChange são oldModel e newModel, basta ler na Wiki. addEventHandler ("onElementModelChange", root, function (oldModel, newModel) if (getElementType (source) == "player") then -- Neste evento, source = elemento que mudou de modelo/skin. if (newModel == 12) then -- Se o jogador está tentando pegar a skin de ID 12, então: if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then -- Se o jogador que está tentando trocar de skin for Console, então: (acho que vc cometeu erro de lógica, deveria ser quem NÃO FOR Console) setElementModel (source, 0) -- Seta skin 0 nele. end end end end) Também troquei a ordem das condições para a verificação mais leve acontecer primeiro. Motivos de otimização.
    1 point
  7. addEventHandler ("onElementModelChange", root, function (thePlayer) if (getElementType (thePlayer) == "player") then if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Console")) then if (getElementModel (thePlayer) == 12) then setElementModel (thePlayer, 0) end end end end)
    1 point
  8. موود رائع جداً ~ وشكل اللوحــهء جميل لــكن => الخط يحتاج لبعض التنسيق والترتيب إستمر فـي إبداعــكء + || ~ تســلمء عـالإهدآآآء
    1 point
  9. السلام عليكم مود عباره علي انك تقدر تغير تصويبة ديقل من لوحه طبعا مود مشفر تقدر تعدل علي مود من ملف setting.lua رابط تحميل : http://cuon.io/8Hj7wQ1
    1 point
  10. بخصوص استفسارك الأول, يب عادي تسوي تايمر آخر يتحقق من وجود التايمر الاول واذا ما كان موجود فهذا يعني ان التايمر انتهى فيه طريقة اخرى عشان تعرف اذا انتهى ولا لا, كمثال التايمر حقك تبيه يشتغل 5 مرات تسوي متغير وتزيده مع كل مرة واذا وصل 5 يعني خلص setTimer ما تقدر ترجعه الا باستخدام killTimer بخصوص طلبك الثاني, اذا سويت تقوم باعادة تشغيل التايمر من جديد يعني باختصار تقوم بتصفير التايمر resetTimer فائدة
    1 point
  11. sx + sy بما ان كودك غير مطروح بالكامل, لا تنسى تتأكد من تعريف local showText = false addEventHandler ( "onClientRender", root, function ( ) dxDrawRectangle(159*sx, 95*sy, 128*sx, 1*sy, tocolor(255, 255, 255, 255), false) dxDrawText("TEST", 372*sx, 244*sy, 938*sx, 329*sy, tocolor(255, 255, 255, showText and 255 or 0), 1.00, "default", "left", "top", false, false, false, false, false) end ) addEventHandler ( "onClientClick", root, function ( button, state ) if ( button == "left" and state == "down" ) then if ( isMouseInPosition ( 159*sx, 95*sy, 128*sx, 1*sy ) ) then showText = not showText end end end )
    1 point
  12. Na verdade a wiki mostra os argumentos obrigatórios e opcionais. Você pode saber quais a função vai utilizar por padrão desta forma: bool outputChatBox ( string text [, element visibleTo = getRootElement(), int r = 231, int g = 217, int b = 176, bool colorCoded = false ] ) Note os colchetes e veja tudo que está dentro dele. É assim que a wiki mostra todos os argumentos/parâmetros opcionais de uma função. visibleTo = getRootElement() - aqui significa que por padrão, o argumento visibleTo receberá getRootElement() (ou root) a menos que você defina ele. E assim por diante.
    1 point
  13. Technically yes, as other wise the message order gets mixed up. The implementation of http2 could help, but I have no idea if that is implemented for the the trigger events. It is at least used for the steamer. So if you want to know how this works, I suggest asking a developer about it. I am making a lot of assumptions, but the one that build it might give you the exact details. Note clients their traffic shouldn't block each other, unless the server is out of bandwidth.
    1 point
  14. CLuaArguments args; args.PushString(szEventName); args.PushBoolean(true); args.Call(luaVM, "addEvent"); Like so I called once MTA functions
    1 point
  15. خطوة جيده منك ولكن لأ انصحك بان تقوم بإستنساخ الفكرة وتقوم بنشرها لأن هذا ليس بـ إبداع , الإبداع هو ان تقوم بإضافة افكار من راسك علي السكربت ليصبح عملك افضل بكثير ومرغوب اكثر من العمل الاصلي نفسه وهذه مجرد نصيحه لك بالمستقبل وبالتوفيق لك يابطل
    1 point
  16. Thanks - an issue has been created here: https://github.com/multitheftauto/mtasa-blue/issues/857
    1 point
  17. Game IP Address changed to mtasa://145.239.227.180:22004 Hunter gamemode coming pretty soon! Stay tuned. Most of FPS issues are fixed and lag is reduced to minimum. Try it out!
    1 point
  18. Hi! I am Ciastuuś(Ciastuus) and today I present the construction system, which is visible in the film below. One day I came up with the idea of creating something that was not there. Namely, we wanted to create a server based on Rustie, but due to lack of time and limitations, we created a demonstration script that will exist on the server that we will open if we find the time. What can the script do? We will answer this question! Building on a designated area Creating all available elements visible in the video Removing manually created items Destroying elements by hitting a vehicle or shooting it with a gun And many more in subsequent versions! The visible zone has been modeled in its entirety, and checking whether an element is in the zone is part of the script. Same as effects. The effects are part of modeling and scripting them. If you have an idea what to add, please write in a comment, thank you! Credits: * Ciastuus(me) * Vagos * x0nx * xS3nd * Kavp * ... more
    1 point
  19. If you're going to add vehicles to the logo atleast use San Andreas vehicles..
    1 point
  20. Hello. This resource adds to your server Message Box (Personal Messages). Here's realized new style of sending and getting messages - like in new popular mobile messengers (telegram, for ex). In functionality - replacing theme of menu, and disabling notifications. If you want custom notifications, heres maintenance this resource. Scrolling carried with middle mouse button and by swiping left mouse button (simulation of touch screen). Here some screenes Video (low quality, sorry) Unread messages is colored in dialog list, selected user too. For open settings, click on arrow down on the titlebar, to close settings, click on black part of window Key to open window - F4 (Close - F4 or Round on left-top part) Download: All links lost, try to use google, this project is unsupported by me. Russian file included (client_rus.lua) Thank you, and sorry for my bad english. Topic is closed.
    1 point
  21. Olá, tente isto: local function Skin( ) if eventName == 'onPlayerSpawn' then local nData = getElementData( source, 'save-skin' ) if nData then setElementModel( source, nData ) end else setElementData( source, 'save-skin', getElementModel( source ) ) end end addEventHandler( 'onPlayerWasted', root, Skin ) addEventHandler( 'onPlayerSpawn', root, Skin )
    1 point
×
×
  • Create New...