• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Broadcast message for x player

tev

Banned User
Joined
Apr 19, 2013
Messages
113
Reaction score
6
HEEEEEEEEY GUYS!!!! This script was made by me. I accept opinions :)

broadcastprivate.lua:
Code:
function onSay(cid, words, param)
t = string.explode(param, ",")

if not t[2] then
doPlayerSendCancel(cid, "Invalid command! :(")
elseif not getPlayerByName(t[1]) then
doPlayerSendCancel(cid, "This player is not online. Try again later")
end

doPlayerSendTextMessage(getPlayerByName(t[1]), MESSAGE_STATUS_WARNING, t[2])
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your message was sent to "..getCreatureName(getPlayerByName(t[1]))..".")
return true
end

talkactions.xml:
Code:
<talkactionlog="yes"access="3"words="/bcp"event="script"value="broadcastprivate.lua"/>

Bye!!
 
Looks nice, why dont you try to remake it in Meta Lua? like player:sendCancel()
 
Back
Top