-.Paradox.- Posted April 19, 2014 Share Posted April 19, 2014 Hello, can somebody tell me what can i use to create my own kill messages (using dxDraw)? Just tell me functions, and i'll post what i tried, Like example when i kill somebody it show a dx text and if killed another one it should appear another dx text but the first text should be up and the second text should be down etc.. Thank you in advance. Link to comment
Karuzo Posted April 19, 2014 Share Posted April 19, 2014 (edited) There are some scripts like that in the community , check them out. The event onPlayerWasted has also a killer parameter if im right. Edited April 19, 2014 by Guest Link to comment
-.Paradox.- Posted April 19, 2014 Author Share Posted April 19, 2014 I don't want to be negative, But i'm trying to create my own.. Link to comment
Karuzo Posted April 19, 2014 Share Posted April 19, 2014 You could just look how those things work. It's just the same as we would tell you the functions ^^ Link to comment
.:HyPeX:. Posted April 19, 2014 Share Posted April 19, 2014 I did my own ones with my BF3 gamemode, i did some crazy messed up shit, as i used up 4 tables, for killer, weapon and killed and last the colour, it was pretty much crazy(But still works) colour = tocolor(0, 119, 255,255) DrawTable = {} DrawTable2 = {} DrawTable3 = {} DrawTable4 = {} local x,y = guiGetScreenSize() function KillScore2(killer, weapon, bodypart) if killer ~= false and killer ~= true then else return end if getPlayerTeam(killer) ~= getPlayerTeam(getLocalPlayer()) then colour = tocolor(248, 101, 21,255) elseif killer == getLocalPlayer() then colour = tocolor(0, 119, 255,255) elseif getPlayerTeam(killer) == getPlayerTeam(getLocalPlayer()) then colour = tocolor(0, 119, 255,255) end local colour = colour local name = getPlayerNametagText(source) local killer = getPlayerNametagText(killer) table.insert(DrawTable, 1, name) table.insert(DrawTable2, 1, weapon) table.insert(DrawTable3, 1, killer) table.insert(DrawTable4, 1, colour) if #DrawTable >= 5 then table.remove(DrawTable) table.remove(DrawTable2) table.remove(DrawTable3) table.remove(DrawTable4) end end addEventHandler("onClientPlayerWasted", getRootElement(), KillScore2) local timer = setTimer(function() table.remove(DrawTable) table.remove(DrawTable2) table.remove(DrawTable3) table.remove(DrawTable4) end, 15000, 0) function RenderingKills2() local USA = getTeamFromName("#ff0000U#ffffffS#0000ffA #ffffff - #0046C8Marines") local RUSSIA = getTeamFromName("#ffffffRU#0000ffSS#ff0000IA #ffffff- #0046C8Sovietz") if not getPlayerTeam(getLocalPlayer()) == USA or not getPlayerTeam(getLocalPlayer()) == RUSSIA then return end local x,y = guiGetScreenSize() local count = 0 for i, v in ipairs(DrawTable) do if i == 2 then y = y/1.2 elseif i == 3 then y = y/1.3 elseif i == 4 then y = y/1.45 elseif i == 1 then y = y else y = y/1.2 end local Weapon = DrawTable2 [ i ] local Killer = DrawTable3 [ i ] local colour = DrawTable4 [ i ] local v = string.gsub(v, "#%x%x%x%x%x%x", "") local Weapon = string.gsub(Weapon, "#%x%x%x%x%x%x", "") if Killer then else return end local Killer = string.gsub(Killer, "#%x%x%x%x%x%x", "") local Weapon = getWeaponNameFromID(Weapon) dxDrawText(tostring(Killer).." ["..Weapon.."] "..v, x/1.5, y/5.5, x/4, y/1, colour, 0.5 / ( ( 1360 / x ) * ( 768 / y ) ), PodiumFont, center, center, false,false,true,true) end end addEventHandler("onClientRender", getRootElement(), RenderingKills2) Link to comment
-.Paradox.- Posted April 19, 2014 Author Share Posted April 19, 2014 Thank HyPex, You helped me a lot, I can fix your mistakes if i found (no offence).. Link to comment
.:HyPeX:. Posted April 19, 2014 Share Posted April 19, 2014 Thank HyPex, You helped me a lot, I can fix your mistakes if i found (no offence).. nevermind, i did this when i was at a veery low point compared to now. (I could have done this shit in a sole table ) 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