Jump to content

Deathmach wons


Snoop.Cat

Recommended Posts

hey i have a problem whit my userpanel , the panel is not showing the players won stats , this are the codes:

tab_client.lua:

guiSetText ( wonStatsLabel, ddswon.."("..round(ddswon/(ddsplayed/100)).."%)") 
local ddswon = tonumber(getElementData(player,"ddswon")) 

core_client.lua

local wintext = string.gsub(wintext,"WON",getElementData(source,"ddswon")) 

core_server.lua

local dataTable = { 
    "cash", 
    "cashearned", 
    "cashspent", 
    "deaths", 
    "toptimes12", 
    "distancetravelled", 
    "racesplayed", 
    "ddsplayed", 
    "ddswon", 
    "lastseen", 
    "playtime", 
    "level",     
    "jointimes", 
    "mapsfinished", 
    "funareakills", 
  } 
  
  
local ddswon = tonumber(getAccountData(account,"ddswon")) 
  
addEvent("onPlayerDestructionDerbyWin",true) 
addEventHandler("onPlayerDestructionDerbyWin",getRootElement(), 
function () 
    destroyElement(playerblip[source]) 
    activePlayers = getElementsByType("player") 
    --Win as last survivor (saver than old method) 
    local account = getPlayerAccount(source) 
    if not (isGuestAccount(account)) then 
        local cash,summeWithLevel = calcCash(1,source) 
  
        outputChatBox("#FFFFFF"..getPlayerName(source).." #FF6347earned #FFFFFF"..tostring(cash).."$",getRootElement(),unpack(scriptcol[1])) 
        addStat(account,"ddsplayed",1) 
        addStat(account,"ddswon",1) 
        addStat(account,"cash",cash + summeWithLevel) 
    else 
        outputChatBox("#FFFFFF"..getPlayerName(source).." #FF6347won as last player alive!",getRootElement(),unpack(scriptcol[1])) 
    end 
  
allTopValues = { 
"playtime", 
"cash", 
"ddsplayed", 
"ddswon", 
"deaths",    
"level", 
"toptimes12", 
"mapsfinished", 
"funareakills", 
} 

this is all i can found , is not the complete panel , if you need some of complete script to help me pm me or say here plz

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