• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved TFS 1.0 getCreatureMaster check master level doesnt work?

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
Hello,

im the only one which has the problem checking master level?

Code:
getCreatureMaster(getPlayerLevel(cid))

thanks in advance.
 
Yes, considering you are passing the level of the creature referenced by "cid" to getCreatureMaster, which expects a creature id, not a level value.

Code:
local master = Creature(cid):getMaster()
if master ~= nil and master:isPlayer() then
    print("The creature is a summon of a player, and the master is level: " .. master:getLevel())
else
    print("The creature is not a summon of a player")
end
 
tfs 0.3.6 - doesn't work
Code:
    local master = getCreatureMaster(cid)
  
    if master ~= nil and isPlayer(master) then
        doCreatureSay(cid, "The creature is a summon of a player", TALKTYPE_ORANGE_1)
    else
        doCreatureSay(cid, "The creature is not a summon of a player", TALKTYPE_ORANGE_1)
    end
 
Back
Top