Is it possible to make command /ps nick,text (code below) also work for spells? And, for example, when I say /ps nick,*nick* text it would send prv msg to someone? Now it's just plain yellow text.
Code:
function onSay(cid, words, param, channel)
if(param == '') then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "jakisbug1"), TRUE
end
local prm = string.explode(param, ",")
local pos = getCreaturePosition(cid)
local plr = getPlayerByName(prm[1])
if (plr == nil) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player is offline or does not exist.")
elseif (prm[2] == nil) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "jakis bug2")
end
return doCreatureSay(plr, prm[2], 1), TRUE
end