Jump to content

I need help with a script


Recommended Posts

addEventHandler("onPlayerLogin",getRootElement(), 
function () 
local account = getPlayerAccount(source) 
local exp = getAccountData(account,"exp") 
if not exp then setAccountData(account,"exp",0) end 
end) 
  
function update(ammo, attacker, weapon, bodypart) 
local account = getPlayerAccount(killer) 
if account then 
local exp = getAccountData(account,"exp") 
setAccountData(account,"exp",exp+100) 
end 
end 
addEventHandler("onPlayerWasted",getRootElement(),update) 

What this Script will do :

If you get killed, you get 100exp. If you want to edit it, that if you kill a Zombie then edit this line :

addEventHandler("onPlayerWasted",getRootElement(),update) -- onPlayerWasted (you have to change this) 

Attention : I just edited Solidsnake14's Code!

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