• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[Eluna] :HasTitle() method does not work

Status
Not open for further replies.

Ican

Enthusiast
Tested it with on chat/on login/on loguot hooks. On chat hook with this code:
Code:
	if(msg =="T" and player:IsGM())then
						if(player:HasTitle(42))then
						print("OK")
							player:UnsetKnownTitle(42)
						end
	end
 

Tommy

Founder
For some reason, without the 'UnsetKnownTitle' method, I have to keep adding the title to myself. With it doing that, it doesn't show that I have the title. :/

Yk6ZHRZ.png


My code:

Code:
function OnEvents(event, plr, msg, _, lang)
    if(msg == "test") then
        if(plr:HasTitle(42)) then
            print("You have this title!")
        else
            print("You don't have this title!")
        end
    end
end

RegisterServerHook(18, OnEvents)

I don't see anything wrong in the C++ code. This is very interesting. :/
 

Rochet2

Moderator / Eluna Dev
Seems that Gladiator is 29 or something in the bitindex while the entry is different (42)
Changing to use title entries from DBC.
~fixed
 
Status
Not open for further replies.
Top