KillerShroom Posted May 26, 2011 Share Posted May 26, 2011 Im making a server and i need a exp script so players get exp when they kill zombies sorry for my bad english Link to comment
BriGhtx3 Posted May 26, 2011 Share Posted May 26, 2011 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
KillerShroom Posted May 26, 2011 Author Share Posted May 26, 2011 im sorry but how do i use it im very new with this Link to comment
KillerShroom Posted May 26, 2011 Author Share Posted May 26, 2011 dose any one wanna create scripts for my server? cus i need a lot of scripts Link to comment
BriGhtx3 Posted May 26, 2011 Share Posted May 26, 2011 First if you want, that somebody scripts something for you, you'll probably have to pay. How you use it? Create a .lua file, and put its name in the meta.xml file (type="server") 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