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

See lvl on look Rep!

zippy

Member
Joined
Feb 1, 2011
Messages
233
Reaction score
8
Hello, i need a script that if you look on a player you can see their level. Because the server i downlaoded got no lvl on look and the creater told me you can make a script on look and im cant make scripts :/

Rep!
 
Im not 100% how it will look like, but i think the script will look like this:

Code:
function onLook(cid, thing, position, lookDistance)
if isPlayer then
local str = "You see a "..getplayerlevel.."].\n"
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
 
What revision do you use? Does it have a documentation folder contain all Lua functions/general scripting documentation? [unless it doesn't support Lua scripting..]
 
Creaturescript (onlook..)
Code:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
doPlayerSetSpecialDescription(thing.uid, "Level: "..getPlayerLevel(thing.uid))
end
return true
end
 
Creaturescript (onlook..)
Code:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
doPlayerSetSpecialDescription(thing.uid, "Level: "..getPlayerLevel(thing.uid))
end
return true
end

Also add:
Code:
<event type="look" name="levellook" event="script" value="levellook.lua"/>
to creaturescripts.xml

(or whatever the scripts name is..)

And add
Code:
registerCreatureEvent(cid, "levellook")
to scripts/login.lua.

I'm afraid you didn't do that all.....
 
Back
Top