Hello,
When you double click a player, I want is to say
17:48 You see Dream (Level 8). He is a knight. [Rebirths: 1]
Can anyone help me with this?
I've looked around on forums and found one that doesn't work :/ with one below
Would be great if someone could fix this and tell me where to place it etc,
Thank you very much!
When you double click a player, I want is to say
17:48 You see Dream (Level 8). He is a knight. [Rebirths: 1]
Can anyone help me with this?
I've looked around on forums and found one that doesn't work :/ with one below
Code:
function getPlayerReset(cid)
local name = getCreatureName(cid)
local Query = db.getResult("SELECT `resets` FROM `players` WHERE `name` = '"..name.."';")
return Query:getDataInt("resets")
end
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) == false then
return true
end
local name = getCreatureName(thing.uid)
local level = getPlayerLevel(thing.uid)
local sex = getPlayerSex(thing.uid)
local vocation = getPlayerVocationName(thing.uid)
local resets = getPlayerReset(thing.uid)
local gmsg = ""
if sex==0 then sex="She" else sex="He" end
local msg = "You see "..name.." (Level "..level.."). "..sex.." is a "..vocation..". ["..resets.." resets]."
if getPlayerGuildId(thing.uid) > 0 then
local gname = getPlayerGuildName(thing.uid)
local grank = getPlayerGuildRank(thing.uid)
local gnick = getPlayerGuildNick(thing.uid)
gmsg = " "..sex.." is "..grank.." of the "..gname.." ("..gnick..")."
end
local echo = msg .. gmsg
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, echo)
return false
end
Would be great if someone could fix this and tell me where to place it etc,
Thank you very much!