Jump to content

Dxdrawtext Change Color


Recommended Posts

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

 

 

ع السريع بقولكم الي عندي، أنا سويت

dxdrawtext

طبعاً حطيت لونه أبيض

أبغى إذا ظغط الشخص Mouse_Wheel_down

يتغير اللون إلى لون معين اختارة انا ، ابي فاكشن يسوي زي كذا

علماً جربت : https://wiki.multitheftauto.com/wiki/DxSetPixelColor

ماله اي فايده

 

مشكورين مقدما

Link to comment
local x,y = guiGetScreenSize (	)
local playerName = getPlayerName ( localPlayer )  
local aColor = tocolor ( 255, 255, 255, 255 )
function drawStuff()
	dxDrawText ( "Welcome " .. playerName, x/3.5, y/3.6, x, y, aColor , 1, "bankgothic" )
	dxDrawText ( "Welcome " .. playerName, x/3.48, y/3.58, x, y, tocolor ( 0, 0, 0, 255 ), 1, "bankgothic" )
	dxDrawLine ( x/3.6, y/3.3, x/1.35, y/3.3, aColor, 2 )
	dxDrawLine ( x/3.59, y/3.275, x/1.348, y/3.275, tocolor ( 0, 0, 0, 255 ), 2 )
end

addEventHandler("onClientRender", root, drawStuff)  

addCommandHandler ( "ChangeColor" , function ( )

	aColor = tocolor ( 255 , 0 , 255 , 255 )

	end
	)

ChangeColor اكتب باف8

وراح تشوف اللون يتغير

Edited by Abdul KariM
  • Like 1
Link to comment
42 minutes ago, Abdul KariM said:

local x,y = guiGetScreenSize (	)
local playerName = getPlayerName ( localPlayer )  
local aColor = tocolor ( 255, 255, 255, 255 )
function drawStuff()
	dxDrawText ( "Welcome " .. playerName, x/3.5, y/3.6, x, y, aColor , 1, "bankgothic" )
	dxDrawText ( "Welcome " .. playerName, x/3.48, y/3.58, x, y, tocolor ( 0, 0, 0, 255 ), 1, "bankgothic" )
	dxDrawLine ( x/3.6, y/3.3, x/1.35, y/3.3, aColor, 2 )
	dxDrawLine ( x/3.59, y/3.275, x/1.348, y/3.275, tocolor ( 0, 0, 0, 255 ), 2 )
end

addEventHandler("onClientRender", root, drawStuff)  

addCommandHandler ( "ChangeColor" , function ( )

	aColor = tocolor ( 255 , 0 , 255 , 255 )

	end
	)

ChangeColor اكتب باف8

وراح تشوف اللون يتغير

ياخي مدري كيف أشكرك شكراً .

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