Y0u$$eF Posted July 20, 2015 Share Posted July 20, 2015 ابي كود تلوين ازرار لوحه الادمنيه عشوائيا + كود تلوين الخانات حق لوحه الادمنيه برضوا عشوائيا Link to comment
B4rb4rian Posted July 20, 2015 Share Posted July 20, 2015 math.random guiLabelSetColor Link to comment
' A F . Posted July 21, 2015 Share Posted July 21, 2015 ^ يعني بتمر على واحد واحد ؟ سوي لوب for .. guiLabelSetColor math.random Link to comment
Mr.R Posted July 21, 2015 Share Posted July 21, 2015 تفضل , ماجربته : ) : حط اسم النافذهـ عشان اذا تبي الاسم حقها يتلون والزر مثل الشيء , هذا مثال addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) if ( isTimer ( TimerColor ) ) then killTimer ( TimerColor ) end TimerColor = setTimer ( function ( ) local RandomColor = string.format ( "%.2X%.2X%.2X%.2X", 255, math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) ) guiSetProperty ( اسم الزر, "NormalTextColour", RandomColor ) guiSetProperty ( اسم النافذه, "CaptionColour", RandomColor ) end, 300, 0 ) end ) Link to comment
#|_oskar_|# Posted July 21, 2015 Share Posted July 21, 2015 يلون كل البوتون بلوحة الادمن setTimer(function() for _, button in ipairs(getElementsByType('gui-button',getResourceRootElement(getThisResource()))) do guiSetProperty(button, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X",255,math.random(255), math.random(255), math.random(255))) end end,500,0) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now