Jump to content

Why not working this dx script?


Turbe$Z

Recommended Posts

local screenW, screenH = guiGetScreenSize()

addEventHandler("onClientRender", root,
    function()
        dxDrawRectangle(screenW * 0.7951, screenH * 0.1944, screenW * 0.1979, screenH * 0.1033, tocolor(0, 0, 0, 131), false)
    end
)

function greetPlayer ( )
	local joinedPlayerName = getPlayerName ( source )
	dxDrawText("#00baff" .. joinedPlayerName .. "#FFffFFJött Kockulni!", 1151, 181, 1420, 202, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false)
end
addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer )

 

Link to comment
local screenW, screenH = guiGetScreenSize()

addEventHandler("onClientRender", root,

    function()
        dxDrawRectangle(screenW * 0.7951, screenH * 0.1944, screenW * 0.1979, screenH * 0.1033, tocolor(0, 0, 0, 131), false)
	end
	
	function greetPlayer()
		dxDrawText("#00baff" .. getPlayerName(source) .. " #FFffFFJött Kockulni!", 1151, 181, 1420, 202, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", true)
	end
addEventHandler ( "onClientPlayerJoin", getRootElement(), greetPlayer )
)

why not working this?

Link to comment
local screenW, screenH = guiGetScreenSize()

addEventHandler("onClientRender", root,
    function()
        if joinedPlayerName then 
            dxDrawRectangle(screenW * 0.7951, screenH * 0.1944, screenW * 0.1979, screenH * 0.1033, tocolor(0, 0, 0, 131), false)
            dxDrawText("#00baff" .. joinedPlayerName .. "#FFffFFJött Kockulni!", 1151, 181, 1420, 202, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false)
        end 
    end
)

function greetPlayer ( )
	joinedPlayerName = getPlayerName (source)
	setTimer ( function()
		joinedPlayerName = nil
	end, 5000, 1 )
end
addEventHandler ( "onClientPlayerJoin", getRootElement(), greetPlayer)

Untested (i'm using the phone)

Edited by Walid
Link to comment
16 minutes ago, Walid said:

local screenW, screenH = guiGetScreenSize()

addEventHandler("onClientRender", root,
    function()
        if joinedPlayerName then 
            dxDrawRectangle(screenW * 0.7951, screenH * 0.1944, screenW * 0.1979, screenH * 0.1033, tocolor(0, 0, 0, 131), false)
            dxDrawText("#00baff" .. joinedPlayerName .. "#FFffFFJött Kockulni!", 1151, 181, 1420, 202, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false)
        end 
    end
)

function greetPlayer ( )
	joinedPlayerName = getPlayerName (source)
	setTimer ( function()
		joinedPlayerName = nil
	end, 5000, 1 )
end
addEventHandler ( "onClientPlayerJoin", getRootElement(), greetPlayer)

Untested (i'm using the phone)

working :DD but, how to add more lines?

Link to comment
21 minutes ago, Walid said:

 

Donate 5$ to MTA (Click Me) and i will do it for you. :P or try to do it by yourself then post your code here.

local screenW, screenH = guiGetScreenSize()

addEventHandler("onClientRender", root,
    function()
            dxDrawRectangle(screenW * 0.7951, screenH * 0.1944, screenW * 0.1979, screenH * 0.1033, tocolor(0, 0, 0, 131), false)
        if join or asd then 
            dxDrawText("#00baff" .. join .. " #FFffFFJött Kockulni!", 1151, 181, 1420, 202, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false)
            dxDrawText("#00baff" .. quit .. " #DF6464Távozott!", 1151, 181, 1420, 202, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false)
		elseif join1 or quit1 then
            dxDrawText("#00baff" .. join1 .. " #FFffFFJött Kockulni!", 1151, 201, 1430, 217, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false)
            dxDrawText("#00baff" .. quit1 .. " #DF6464Távozott!", 1151, 201, 1430, 217, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false)
		elseif join2 or quit2 then
            dxDrawText("#00baff" .. join2 .. " #FFffFFJött Kockulni!", 1151, 222, 1422, 239, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false)
            dxDrawText("#00baff" .. quit2 .. " #DF6464Távozott!", 1151, 222, 1422, 239, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false)
        end 
    end
)

function greetPlayer ( )
	join = getPlayerName (source)
	join1 = getPlayerName (source)
	join2 = getPlayerName (source)
	--setTimer ( function()
		--joinedPlayerName = nil
	--end, 5000, 1 )
end
addEventHandler ( "onClientPlayerJoin", getRootElement(), greetPlayer)

function greetPlayer7 ( )
	quit = getPlayerName (source)
	quit1 = getPlayerName (source)
	quit2 = getPlayerName (source)
	--setTimer ( function()
		--joinedPlayerName = nil
	--end, 5000, 1 )
end
addEventHandler ( "onClientPlayerQuit", getRootElement(), greetPlayer7)

i tried this but not good :S

Edited by Turbo777
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...