Hello,
could someone help me with making this script work so that:
if player with group id lower then x can't send a private message but if group id higher than x then a player can send a private message.
here is the script:
thank you very much
could someone help me with making this script work so that:
if player with group id lower then x can't send a private message but if group id higher than x then a player can send a private message.
here is the script:
Code:
local ignore = createConditionObject(CONDITION_GAMEMASTER, -1, false, GAMEMASTER_IGNORE)
local teleport = createConditionObject(CONDITION_GAMEMASTER, -1, false, GAMEMASTER_TELEPORT)
function onSay(cid, words, param, channel)
local condition = ignore
local subId = GAMEMASTER_IGNORE
local name = "private messages ignoring"
if(words:sub(2, 2) == "c") then
condition = teleport
subId = GAMEMASTER_TELEPORT
name = "map click teleport"
end
local action = "off"
if(not getCreatureCondition(cid, CONDITION_GAMEMASTER, subId)) then
doAddCondition(cid, condition)
action = "on"
else
doRemoveCondition(cid, CONDITION_GAMEMASTER, subId)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have turned " .. action .. " " .. name .. ".")
return true
end
thank you very much
Last edited: