Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. Does it output the line 7?
  2. جرب ------------------------------------------ -- TopBarChat -- ------------------------------------------ -- Developer: Braydon Davis -- -- File: c.lua -- -- Copyright 2013 (C) Braydon Davis -- -- All rights reserved. -- ------------------------------------------ sec = {{{{{{},{},{},{}}}}}} -- ------------------------------------------ local maxMessages = 5; -- The max messages that will show (on each bar) local DefaultTime = 8; -- The max time each message will show if time isn't defined. ---------- DON'T EDIT BELOW HERE UNLESS YOU KNOW WHAT YOUR DOING! ---------- local sx, sy = guiGetScreenSize ( ) local DefaultPos = true; -- Top bar variables local timer_top = { } local timer_btm = { } -- Bottom bar variables local messages_top = { } local messages_btm = { } function sendClientMessage ( msg, r, g, b, pos, time ) -- Msg: String -- R: Int (0-255) -- G: Int (0-255) -- B: Int (0-255) -- Pos: Boolean -- Time: Int local r, g, b = r, g, b or 255, 255, 255 if ( pos == nil ) then pos = DefaultPos end -- Check for pos if ( time == nil ) then time = DefaultTime end -- Check for time local GsubedMessage = msg:gsub ( "#%x%x%x%x%x%x", "" ) if ( pos == true ) then -- if ( not isTimer ( timer_top[GsubedMessage] ) ) then local c_messages = messages_top; if ( #messages_top >= maxMessages ) then local c_messages = messages_top; messages_top = { } for i,v in ipairs ( c_messages ) do if ( i ~= 1 ) then table.insert ( messages_top, { v[1], v[2], v[3], v[4] } ) end end end table.insert ( messages_top, { msg, r, g, b } ) timer_top[GsubedMessage] = setTimer ( function ( msg ) for i,v in ipairs ( messages_top ) do if ( v[1] == msg ) then table.remove ( messages_top, i ) break end end end, time*1000, 1, msg ) return_value = true -- else return_value = false end else if not ( isTimer ( timer_btm[GsubedMessage] ) ) then local c_messages = messages_btm; if ( #messages_btm >= maxMessages ) then local c_messages = messages_btm; messages_btm = { } for i,v in ipairs ( c_messages ) do if ( i ~= 1 ) then table.insert ( messages_btm, { v[1], v[2], v[3], v[4] } ) end end end table.insert ( messages_btm, { msg, r, g, b } ) timer_btm[GsubedMessage] = setTimer ( function ( msg ) for i,v in ipairs ( messages_btm ) do if ( v[1] == msg ) then table.remove ( messages_btm, i ) break end end end, time*1000, 1, msg ) return_value = true else return_value = false end end return return_value or false end local TheResourceName = getResourceName ( getThisResource ( ) ) addEvent ( TheResourceName..":sendClientMessage", true ) addEventHandler ( TheResourceName..":sendClientMessage", root, sendClientMessage ) function dxDrawNotificationBar ( ) for i,v in ipairs ( messages_top ) do local i = i - 1 -- Because tables start at 1 -.- if ( i == #messages_top-1 ) then dxDrawRectangle ( ( sx/2-530/2 ), i*25, 530, 25, tocolor ( 0, 0, 0, 100 ) ) end dxDrawRectangle ( ( sx/2-530/2 ), i*25, 530, 25, tocolor ( 0, 0, 0, 120 ) ) dxDrawText ( v[1], 0, i*25+5, sx, 25, tocolor ( v[2], v[3], v[4], 255 ), 1, "default-bold", "center", "top", true, false, false, true ) end for i,v in pairs ( messages_btm ) do local i = i - 1 local y = i * 25+25 if ( i+1 == #messages_btm ) then dxDrawRectangle ( ( sx/2-530/2 ), (sy-y), 530, 25, tocolor ( 0, 0, 0, 120 ) ) end dxDrawRectangle ( ( sx/2-530/2 ), (sy-y), 530, 25, tocolor ( 0, 0, 0, 120 ) ) dxDrawText ( v[1], 0, (sy-y+5), sx, sy, tocolor ( v[2], v[3], v[4], 255 ), 1, "default-bold", "center", "top", true, false, false, true ) end end addEventHandler ( "onClientRender", root, dxDrawNotificationBar ) الغيت سطر 38 + 59
  3. if isElement(element) and getElementType ( element ) == "vehicle" then
  4. المود فيه مضاد تكرار عشان كذا ما يجي الكلام نفسه اكثر من مره
  5. مو عارف تركب الكود و بتسوي قيم مود؟ !عجيب
  6. "gang" الكود الي بالموضوع الألمنت داتا "Group" الألمنت داتا حق مود العقرب يعني تحتاج تغير اسم الألمنت داتا
  7. theTimer = setTimer(function() end, 1000, 10) -- A timer that does nothing. function timerDetails() remaining, executesRemaining, totalExecutes = getTimerDetails(theTimer) -- Get the timers details if (remaining and executesRemaining and totalExecutes) then outputChatBox("Time remaining this second: "..remaining.." Executes remaining: "..executesRemaining.." Total executes: "..totalExecutes) else outputChatBox("Timer no longer exists") end end addCommandHandler("timerdetails", timerDetails)
  8. هنا ما نسوي لك الكود انت تسويه بنفسك و المثال موجود بالويكي
  9. 1- ثانية 90 يعني دقيقة و نص 2- addCommandHandler getTimerDetails
  10. TAPL

    Skin

    The second parameter is the command name.
  11. في السيرفر استبدل هذا triggerClientEvent("sora", getRootElement(), message) بـ triggerClientEvent("sora", thePlayer, message) في الكلينت ضيف هذا بعد سطر 6 يعني بيكون في سطر 7 nameAdmin = getPlayerName(source) و احذف هذا local nameAdmin = getPlayerName(thePlayer)
  12. ينقل إلى قسم البرمجة
  13. ينقل لقسم البرمجة
  14. TAPL

    Skin

    This small number of words are not enough to explain what you want. But i guess you looking for something like: setElementModel
  15. ينقل إلى قسم البرمجة
  16. جرب هذا exports.scoreboard:scoreboardAddColumn("FPS", root, 70, "FPS", 4) أو هذا exports.scoreboard:scoreboardSetColumnPriority("FPS", 4) او هذا exports.scoreboard:addScoreboardColumn("FPS", root, 4, 70) مدري كم بيكون رقم الترتيب بالضبط إذا ما صار الي تبيه جرب تغير الرقم 4 بزيادة او نقصان
  17. لأني مو فاهمك ذذ getFPSLimit ممكن تفهمني وش الفرق بين كودك وبين الفنكشن ذا getFPSLimit هذا يجيب حد اللمت بالسيرفر اما الكود الي بالموضوع هذا يجيب الفبس الحالي حق اللعبة و اللمت الي تشوفه بالكود هو تسجيل لأعلى فبس اللعبة و صلت له
  18. استبدل هذا exports.scoreboard:addScoreboardColumn("FPS") بهذا exports.scoreboard:scoreboardAddColumn("FPS", root, 70) ان كان العرض كبير قلل الرقم الـ 70 ان كان العرض صغير زود الرقم الـ 70
  19. function cancelMining(button, state) if (source==bCancelMining) and (button=="left") and (state=="down") then guiSetVisible(miningUI, false) destroyElement(miningUI) miningUI = nil showCursor(false) removeEventHandler("onClientGUIClick", bCancelMining, cancelMining) end end
  20. قصدك تبي الكلام يطلع بس لللاعب؟ source إلى root غير كلمة outputChatBox الي بالكود
  21. انت تقول يسوي قيم مود كامل ب 7 دولار كيف يعني مو اي واحد يسويه مو قيم مود؟ ولا ايش FFS سيرفر
  22. انا كلمت الروسي Lex128 حق مود التكتيك قالي اسوي لك قيم مود كامل ب 7 دولار ؟؟ قل قسم خلاص إذا السالفه كذا FFS خليه يسوي لنا قيم مود زي دولار 7 جاهزه على بيبال C++ إلى Lua ولا صح ما قلت لنا متى راح يغيرون لغة
  23. دولار 5 تكسب منها هههههههههههههههههههه بالله كم يوم يبي لك عشان تبرمج مود حرب عصابات و تصميم سجن و برمجة السجن و وقت السجن و شوب اسلحة و اعتقال و خطف و مهمات و مدري ايش ذا 5 دولار ههههههههههههه لو تقول لي 50 دولار ما سويته
  24. ??? فتحت الرابط اول؟ https://forum.multitheftauto.com/viewtopic.php?f=108&t=62995&p=599302 شفت الموضوع؟ موجود مثال!
  25. Topic Locked.
×
×
  • Create New...