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

Lua Help with script onLook!! Rep

Gothric

New Member
Joined
Feb 6, 2010
Messages
264
Reaction score
1
i am writting script onLook and i want to send player message when he looked on item with uid xxxx

i use this
PHP:
if thing.uid == xxxx then

but it doesnt work :/ help
 
Are you sure you don't want to look for item id or something like an actionid? I don't think uid would be the way to go here.. post your script and tell us what happens.
 
Code:
function onLook(cid, thing, position, lookDistance)
	local item = getItemInfo(thing.itemid)
	if not item then
		return true
	end
	
	if item.readable then
		if item.uid == XXXX then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Message here!")
		end
	end
	
	return true
end

getItemInfo doesn't return uid

pwnd again? =/
 
Back
Top