Jump to content

getName() is an inappropriate function


Maris

Recommended Posts

-- when you or a npc try to hit something
xpUpdate.onWeaponHitXp = function(owner, weapon, hitObject, damage)
    local isShove = false
    if hitObject:isOnFloor() == false and weapon:getName() == "Bare Hands" then

The function getName() returns translated name! It may be not English.

So it should be:

weapon:getType() == "BareHands"

 

Link to comment
Share on other sites

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
×
×
  • Create New...