Jump to content

طلب تعديل على كود


Recommended Posts

السلام عليكم ورحمة الله

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

انا جربت كثير ومانفع

الكود

r,g,b = 63,252,41 
rr,gg,bb =0,0,0 
num = 1 
px = 0 
-------------------- 
function getColor() 
    return r,g,b 
end 
function getBackColor() 
    return rr,gg,bb 
end 
function setColor(tr,tg,tb) 
    r,g,b = tr,tg,tb 
end 
function setBackColor(r,g,b) 
    rr,gg,bb = r,g,b 
end 
addEventHandler("onClientRender",root, 
    function () 
        local x,y = guiGetScreenSize() 
        dxDrawRectangle(0,y - 20,x,y,tocolor(rr,gg,bb,120)) 
        dxDrawText(chat[num],px,y - 20,x,y,tocolor(r,g,b,255),1.5,"default-bold","center","center",false,false,false,true) 
    end 
) 
function makeTurn() 
    local x,y = guiGetScreenSize() 
    local x = x + 50 
    if px >= x then 
        px = -x 
        setchat() 
    else 
        px = px + 6 
    end 
end 
function setchat() 
    if num == #chat then 
        num = 1 
    else 
        num = num + 1 
    end 
end 
---- 
start = setTimer(makeTurn,100,00) 
stop = setTimer(makeTurn,50,00) 

Link to comment
  
r,g,b = 63,252,41 
rr,gg,bb =0,0,0 
num = 1 
px = 0 
-------------------- 
function getColor() 
    return r,g,b 
end 
function getBackColor() 
    return rr,gg,bb 
end 
function setColor(tr,tg,tb) 
    r,g,b = tr,tg,tb 
end 
function setBackColor(r,g,b) 
    rr,gg,bb = r,g,b 
end 
addEventHandler("onClientRender",root, 
    function () 
        local x,y = guiGetScreenSize() 
        local xx,yy = x/2,y/2 
        dxDrawRectangle(0,yy,x,yy/13,tocolor(rr,gg,bb,120)) 
        dxDrawText(chat[num] ,px,yy/12,x,y,tocolor(r,g,b,255),1.5,"default-bold","center","center",false,false,false,true) 
    end 
) 
function makeTurn() 
    local x,y = guiGetScreenSize() 
    local x = x + 50 
    if px >= x then 
        px = -x 
        setchat() 
    else 
        px = px + 6 
    end 
end 
function setchat() 
    if num == #chat then 
        num = 1 
    else 
        num = num + 1 
    end 
end 
---- 
start = setTimer(makeTurn,100,00) 
stop = setTimer(makeTurn,50,00) 

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...