Jump to content

Exp System doesnt work!


directshot

Recommended Posts

This resource won't work MAGICALLY, it has EXPORTED fuctions that you can use for y our own purposes.

If you would have READ the description of the resource, you could have noticed that it wasn't a magic script.

Exported functions (server-side only): 
getPlayerLevel -> arguments: thePlayer 
setPlayerLevel ->arguments: thePlayer, theLevel 
getPlayerEXP -> arguments: thePlayer 
setPlayerEXP -> arguments: thePlayer, theExperience 
addPlayerEXP -> arguments: thePlayer, theExperience 

A way of using it with zombies by Slothman:

addEvent("onZombieWasted",true) 
addEventHandler("onZombieWasted",root, 
function (killer) 
exports.exp_system:addPlayerEXP(killer,5) 
end) 

Link to comment

Ok, then use this:

-- script.lua

addEventHandler("onPlayerWasted",root, 
function (_,killer) 
if (killer and killer ~= source) then 
        exports.exp_system:addPlayerEXP(killer,5) 
    end 
end) 

-- meta.xml:

    "Castillo" type="script" version="1.0"/> 
  
    

With these two codes you must create a new RESOURCE in your "resources" folder, there you must create two files, one called: script.lua and other called meta.xml after that, copy the code from here and paste it in the respective file.

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