been a while since I've scripted for tfs 0.3.6bump
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
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
ChangeWhen I use the medal it shows me the message but when i look on the player doesn't show the description.
if getPlayerStorageValue(cid) == 1950 then
if getPlayerStorageValue(thing.uid) == 1950 then
My bad I'm a moron. Overlooked the real problem, wouldve been nice if you posted the error thoughSame.
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?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
There is, I prefer getCreatureStorage though, that wasn't the issue thoughforgot the getCreatureStorage xD there ain't no getPlayerStorageValue?![]()
that's the only thing u changed xDThere is, I prefer getCreatureStorage though, that wasn't the issue though![]()
I'd take a closer look.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
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