function onSay(cid, words, param, channel)
local subId = GAMEMASTER_INVISIBLE
local pid = getPlayerByNameWildcard(param)
local player_id = getPlayerGUIDByName(param)
if player_id == nil then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This player doesn't exists.")
return TRUE
end
if(not pid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The player is currently not here.")
return TRUE
end
if(param == "") then
if getCreatureCondition(cid, CONDITION_GAMEMASTER, subId) then
doRemoveCondition(cid, CONDITION_GAMEMASTER, subId)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are visible again.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not invisible.")
end
return TRUE
end
if getCreatureCondition(pid, CONDITION_GAMEMASTER, subId) then
doRemoveCondition(pid, CONDITION_GAMEMASTER, subId)
doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, ""..getPlayerName(cid).." has turned you visible again.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The player is not invisible.")
end
return TRUE
end