Jump to content

kills/deaths for destruction derby/race


Fury

Recommended Posts

Posted

hi, how can i work this with race mode?

function addTotalKill(totalAmmo, killer, killerWeapon, bodypart, stealth) 
local account = getPlayerAccount (killer) 
if (account) and (killer) then 
setAccountData(account,"kills",getAccountData(account,"kills")+1) 
setElementData(killer, "kills", getAccountData(account,"kills")) 
end 
end 
addEventHandler ("onPlayerWasted", getRootElement(), addTotalKill) 
function addTotalDeath(totalAmmo, killer, killerWeapon, bodypart, stealth) 
local account = getPlayerAccount (source) 
if (account) then 
setAccountData(account,"deaths",getAccountData(account,"deaths")+1) 
setElementData(source, "deaths", getAccountData(account,"deaths")) 
end 
end 
addEventHandler ("onPlayerWasted", getRootElement(), addTotalKill) 
function checkAccountKillsDeaths(thePreviousAccount, theCurrentAccount, autoLogin) 
if (getAccountData(theCurrentAccount,"kills") == nil) and (getAccountData(theCurrentAccount,"deaths") == nil) then 
setAccountData(theCurrentAccount,"kills",0) 
setAccountData(theCurrentAccount,"deaths",0) 
end 
end 
addEventHandler("onPlayerLogin",getRootElement(),checkAccountKillsDeaths) 
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), 
function() 
call(getResourceFromName("scoreboard"), "addScoreboardColumn", "kills",getRootElement(),1) 
call(getResourceFromName("scoreboard"), "addScoreboardColumn", "deaths",getRootElement(),2) 
end) 

Destruction Derby

Posted

He's not asking for help to fix something, he wants to make that script work on "race" game mode.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
He's not asking for help to fix something, he wants to make that script work on "race" game mode.

i can pay for it.. if anyone can make that.

Destruction Derby

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