Jump to content

طلب تعديل


Recommended Posts

هلا والله#

هذا توب بار شات

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

screenX, screenY = guiGetScreenSize() 
topChat = { 
  {"", 255, 50, 50}, 
} 
  
setTimer(function() table.remove(topChat, 1) end, 10000, 1) 
setTimer(function() table.remove(topChat, 1) end, 10000, 1) 
  
  
addEventHandler("onClientPreRender",root,  
  function() 
    dxDrawRectangle(screenX/4+(screenX/16),1*20-20,screenX/2-(screenX/16),20.0,tocolor(0,0,0,150),false) 
    local x, y, z = getElementPosition(localPlayer) 
    dxDrawText("Welcome]",screenX/4+(screenX/16),1*40-40,screenX/2-(screenX/16),20.0,tocolor(0,0,250),1.0,"default-bold","left","center",false,false,false, true) 
    if #topChat >= 8 then table.remove(topChat, 1) end 
    for k, v in ipairs(topChat) do 
      dxDrawRectangle(screenX/4+(screenX/16),k*20,screenX/2-(screenX/16),20.0,tocolor(0,250,0,150),false) 
      dxDrawText("    "..v[1],screenX/4+(screenX/16),k*40,screenX/2-(screenX/16),20.0,tocolor(v[2],v[3],v[4],255),1.0,"default-bold","left","center",false,false,false, true) 
    end 
  end 
) 
  
function outputTopChat(message, r, g, b) 
  table.insert(topChat, { message, r, g, b }) 
  local thetime = getRealTime() 
  outputConsole("["..string.format("%.2d:%.2d:%.2d", thetime.hour, thetime.minute, thetime.second).."] "..message:gsub("#%x%x%x%x%x%x", "")) 
  setTimer(function() table.remove(topChat, 1) end, 60000, 1) 
end 
addEvent("outputTopChat", true) 
addEventHandler("outputTopChat", root, outputTopChat) 

Link to comment

جرب

creenX, screenY = guiGetScreenSize() 
topChat = { 
  {"", 255, 50, 50}, 
} 
  
setTimer(function() table.remove(topChat, 1) end, 10000, 1) 
  
addEventHandler("onClientPreRender",root, 
  function() 
    dxDrawRectangle(screenX/4+(screenX/16),screenY*747/768,screenX/2-(screenX/16),21.0,tocolor(0,0,0,150),false) 
    local x, y, z = getElementPosition(localPlayer) 
    dxDrawText("  [Welcome]",screenX/4+(screenX/16),screenY*747/768,screenX*960/1280,screenY*768/768,tocolor(0,0,250),1.0,"default-bold","left","center",false,false,false, true) 
    if #topChat >= 8 then table.remove(topChat, 1) end 
    for k, v in ipairs(topChat) do    
      dxDrawRectangle(screenX/4+(screenX/16),screenY*747/768-(k*20) ,screenX/2-(screenX/16),20.0,tocolor(0,250,0,150),false) 
      dxDrawText("    "..v[1],screenX/4+(screenX/16),screenY*744/768-(k*40) ,screenX*960/1280,screenY*768/768,tocolor(v[2],v[3],v[4],255),1.0,"default-bold","left","center",false,false,false, true) 
    end 
  end 
) 
  
function outputTopChat(message, r, g, b) 
  table.insert(topChat, { message, r, g, b }) 
  local thetime = getRealTime() 
  outputConsole("["..string.format("%.2d:%.2d:%.2d", thetime.hour, thetime.minute, thetime.second).."] "..message:gsub("#%x%x%x%x%x%x", "")) 
  setTimer(function() table.remove(topChat, 1) end, 60000, 1) 
end 
addEvent("outputTopChat", true) 
addEventHandler("outputTopChat", root, outputTopChat) 

Link to comment

غلط الكوود اخوي

طلع لي مشكلة في الديبوق

سطر 10

line 10 : attempt to perform arithmetic on global 'screenX' (a nil value)

سطر عشرة عندك هو :

dxDrawRectangle(screenX/4+(screenX/16),screenY*747/768,screenX/2-(screenX/16),21.0,tocolor(0,0,0,150),false) 

Link to comment
غلط الكوود اخوي

طلع لي مشكلة في الديبوق

سطر 10

line 10 : attempt to perform arithmetic on global 'screenX' (a nil value)

سطر عشرة عندك هو :

dxDrawRectangle(screenX/4+(screenX/16),screenY*747/768,screenX/2-(screenX/16),21.0,tocolor(0,0,0,150),false) 

سطر واحد خله كذا

screenX, screenY = guiGetScreenSize() 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...