• 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!

[C++] doSendMessage(channel_id, type)

Erexo

Kage
Premium User
Joined
Mar 27, 2010
Messages
743
Solutions
5
Reaction score
200
Location
Pr0land
GitHub
Erexo
Hello, can anyone make a function like
Code:
doSendMessage(channel_id, text)

Example:
LUA:
doSendMessage(5, "Hello players!")

That will send in game-Chat text "Hello players!".


Thanks,
Erexo.
 
Last edited:
LUA:
function onSay(cid, words, param)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        else
        	for _, pid in ipairs(getPlayersOnline()) do
		doPlayerSendChannelMessage(pid, "Server", ""..param.."", TALKTYPE_CHANNEL_O, CHANNEL_DEFAULT)
	end
	end
	return true
end
not sure tho
 
Doesnt work :S

@EDIT
LUA:
function onSay(cid, words, param)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        else
        	for _, pid in ipairs(getPlayersOnline()) do
		doPlayerSendChannelMessage(pid, "Server", ""..param.."", TALKTYPE_CHANNEL_O, 5)
	end
	end
	return true
end

Now works :D

Thanks you panda :3

@Edit2

Oh panda, if you can, can you give me list with avaliable colors of text in that chat? :3
 
Last edited:
Back
Top