• 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!

Player Title

Alazico

New Member
Joined
Jul 2, 2015
Messages
9
Reaction score
0
Anyone knows how to add a title to the player, like: "18:27 You see Super (Level 357). He is a knight
He is a prince.
Thanks in advance.
 
been a while since I've scripted for tfs 0.3.6 :D

Code:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
    if getPlayerStorageValue(cid) == 1950 then
        doPlayerSetSpecialDescription(thing.uid, "He is a prince")
    end
end
return true
end

then just set an action script to give the storage 1950
Code:
function onUse(cid, item, frompos, item2, topos)

if item.itemid == 5785 then

local playerpos = getCreaturePosition(cid)

doRemoveItem(item.uid,5785)
setPlayerStorageValue(cid,1950,1)

doSendMagicEffect(playerpos, 12)
doCreatureSay(cid, "Congratulations, now you acquired the Prince description!", TALKTYPE_ORANGE_1)
end
end

Hope I didn't fail heh :oops:
 
My bad I'm a moron. Overlooked the real problem, wouldve been nice if you posted the error though
Code:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
    if getCreatureStorage(thing.uid, 1950) == 1 then
        doPlayerSetSpecialDescription(thing.uid, "\nHe is a prince")
    end
end
return true
end
 
My bad I'm a moron. Overlooked the real problem, wouldve been nice if you posted the error though
Code:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
    if getCreatureStorage(thing.uid, 1950) == 1 then
        doPlayerSetSpecialDescription(thing.uid, "\nHe is a prince")
    end
end
return true
end
forgot the getCreatureStorage xD there ain't no getPlayerStorageValue? o.O
 
Code:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
    if getPlayerStorageValue(cid) == 1950 then
        doPlayerSetSpecialDescription(thing.uid, "He is a prince")
    end
end
return true
end
I'd take a closer look.
Code:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
    if getCreatureStorage(thing.uid, 1950) == 1 then
        doPlayerSetSpecialDescription(thing.uid, "\nHe is a prince")
    end
end
return true
end
 
(in case it escapes notice) You were checking for the storage, not the value of the storage.
He also made it go on the next line instead of the same line as the rest of the description.
 
Back
Top