Recommended Posts

Posted (edited)

Hey 😊

I have question about edit gamemode race thes i mean how i can do that?

and my edit like very stupid😢

in final got message winner players like

Winner:

NamePlayer

but i want to do 3 message win like 

Example:🤔

----------------------------------------------------------------------------------------------

1st:🥇

Nickname

2nd:2️⃣

Nickname

3rd:3️⃣

Nickname

----------------------------------------------------------------------------------------------

and i test code like these i know code have mistake but how i add 2nd and 3rd?

Code:

function winnerMessenger ( text, playerName)
    win.text = text
    win.name = playerName	
    win.name2 = playerName
    win.name3 = playerName
	removeEventHandler("onClientRender",root,winMsg)
	addEventHandler("onClientRender",root,winMsg)
	race.mapInfo.infos = {}
end
addEvent("winnerMessage",true)
addEventHandler("winnerMessage",getRootElement(),winnerMessenger)

function winMsg()
    win.pro2 = win.pro2 + 0.005
	race.alpha = interpolateBetween(race.alpha,0,0,0,0,0,win.pro2,"Linear")
    win.pro = win.pro + 0.01
    x1, x2, win.alpha = interpolateBetween(-s,s,win.alpha,0,0,255,win.pro,"Linear")
	local alpha = win.alpha/255
	fadeCamera( false, 4, 0, 0, 0)
	if not getElementData(localPlayer,"login") then return end
	dxDrawText(win.name, 564*sx, 341*sy, 717*sx, 380*sy, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, true)
	dxDrawText(win.name2, 352*sx, 292*sy, 505*sx, 331*sy, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, true)
	dxDrawText(win.name3, 773*sx, 292*sy, 926*sx, 331*sy, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, true)
end

function remWin ()
    win.text = ""
	win.name = ""
	win.name2 = ""
	win.name3 = ""
    removeEventHandler("onClientRender",root,winMsg)
	win.pro = 0
	win.pro2 = 0
	win.alpha = 0
end

 

Edited by liwahadri

Share this post


Link to post

Use a multiline string.

win.text = [[
  1st:

  Nickname 123

  2nd:

  Nickname 13123

  3nd:

  Nickname 141523
]]

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.