Jump to content

Little quest *


Spyke25

Recommended Posts

Posted

Hey all, i would to enable the color code at the Death-messages like that :

2najods.jpg

( Cause mine is white )

So, what file i need to edit? And then i will post my code and i hope you can help me enable it

Posted

You can't "enable" it or "disable" it, the script doesn't has that by default, you must edit it to use DX drawing functions instead of GUI (default).

Posted

Ok, it contains :

RankingBoard = {} 
RankingBoard.__index = RankingBoard 
  
RankingBoard.clientInstances = {} 
  
function RankingBoard:create() 
    local result = { id = #RankingBoard.clientInstances + 1, items = {} } 
    RankingBoard.clientInstances[result.id] = true 
    clientCall(g_Root, 'RankingBoard.create', result.id) 
    result.joinHandler = function() result:playerJoined(source) end 
    addEventHandler('onPlayerJoin', getRootElement(), result.joinHandler) 
    return setmetatable(result, self) 
end 
  
function RankingBoard:clientCall(player, fn, ...) 
    clientCall(player, 'RankingBoard.call', self.id, fn, ...) 
end 
  
local savedplrcount = 1 
  
function RankingBoard:setDirection(direction, plrcount) 
    savedplrcount = plrcount 
    if direction == 'up' or direction == 'down' then 
        self.direction = direction 
        self:clientCall(g_Root, 'setDirection', direction, plrcount ) 
    end 
end 
  
function RankingBoard:add(player, time) 
    local playerName = getPlayerName(player) 
    if table.find(self.items, 'name', playerName) then 
        return 
    end 
    table.insert(self.items, { name = playerName, time = time }) 
    self:clientCall(g_Root, 'add', playerName, time) 
end 
  
function RankingBoard:playerJoined(player) 
    clientCall(player, 'RankingBoard.create', self.id) 
    if self.direction then 
        self:clientCall(player, 'setDirection', self.direction, savedplrcount ) 
    end 
    self:clientCall(player, 'addMultiple', self.items) 
end 
  
function RankingBoard:clear() 
    self:clientCall(g_Root, 'clear') 
    self.items = {} 
end 
  
function RankingBoard:destroy() 
    self:clientCall(g_Root, 'destroy') 
    removeEventHandler('onPlayerJoin', getRootElement(), self.joinHandler) 
    RankingBoard.clientInstances[self.id] = nil 
end 

Can you edit it for me, please?

Posted

Cadu12, if you are not going to give it to him, then why the f*** do you post here? this section is to help people learning, not to say what do you have.

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