Hello, Im currently creating a script (assassin outfit) and if the player don't have any beer whine or rum when greeting him he should simply ungreet the player.
I tested this function as it exists in "npchandler.lua"
NpcHandler:unGreet(cid)
Yet does noting?
Here is my current greet code for removing whine beer and rum + answearing with a custom message if the player doesn't have the above items.
He doesn't "ungreet" the player, and no error.
Anyone know how to do this?
cheers
//Massen
I tested this function as it exists in "npchandler.lua"
NpcHandler:unGreet(cid)
Yet does noting?
Here is my current greet code for removing whine beer and rum + answearing with a custom message if the player doesn't have the above items.
Lua:
function greetCallback(cid)
if doPlayerRemoveItem(cid, 2012, 1, 3) or doPlayerRemoveItem(cid, 2013, 1, 15) or doPlayerRemoveItem(cid, 5553, 1, 27) then
npcHandler:setMessage(MESSAGE_GREET, "Hey t-there, you look like someone who enjoys a good booze.")
return true
else
npcHandler:setMessage(MESSAGE_GREET, "I wont talk to <Hicks> such teetotaller... bring me some booze!")
NpcHandler:unGreet(cid)
return true
end
end
He doesn't "ungreet" the player, and no error.
Anyone know how to do this?
cheers
//Massen