Jacobob14 Posted March 4, 2014 Posted March 4, 2014 what is the problem function levelup() local x,y,z = getElementPosition(localplayer) local player = getLocalPlayer() local sound = playSound3D ( "levelup.ogg",x,y,z ) attachElements (sound, player) setElementHealth ( player, getElementHealth(player) + 100 ) end addEventHandler( "onPlayerLevelUP", getRootElement(), levelup )
Controlled Posted March 4, 2014 Posted March 4, 2014 What's the error? Did you make a event for onPlayerLevelUP?
xXMADEXx Posted March 4, 2014 Posted March 4, 2014 I don't see a addEvent in your script Also, the variable "player" isn't defined.
Moderators Citizen Posted March 4, 2014 Moderators Posted March 4, 2014 I don't see a addEvent in your script Also, the variable "player" isn't defined. It is on my screen By the way he is using localPlayer and then uses a new temp variable to store getLocalPlayer() and uses that new variable (player) instead of localPlayer. Also some one asked you about errors but you didn't reply ... So please do. 3 possible reasons: 1 - The event isn't created (use addEvent like Controlled said). 2 - There is an error somewhere in this file so it is not loaded. 3 - The event onPlayerLevelUP is never triggered.
Castillo Posted March 4, 2014 Posted March 4, 2014 You are using my "exp_system" resource, is that correct? if so, then that code won't work, because the event is server side.
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