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

[REQUEST] Script

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
I need one script the player speak !suggestion MSG_HERE and appers the msg in one Channel(only access= 5+).

EX:

!suggestion New Stages - and appers in Channel:


Hyes [9]: Suggestion: New Stages

Thx all
 
LUA:
local channel = CHANNEL_HELP

function onSay(cid, words, param, channel)

	if param == "" then return true end

	return doPlayerSendChannelMessage(cid, "Suggestion", param, TALKTYPE_CHANNEL_O, channel) and true
end
XML:
	<talkaction log="yes" words="!suggestion" access="5" event="script" value="suggestion.lua"/>
 
LUA:
local channel = CHANNEL_HELP

function onSay(cid, words, param, channel)

	if param == "" then return true end

	return doPlayerSendChannelMessage(cid, "Suggestion", param, TALKTYPE_CHANNEL_O, channel) and true
end
XML:
	<talkaction log="yes" words="!suggestion" access="5" event="script" value="suggestion.lua"/>

u dont understand? :(

the player speak !suggestion MSG_HERE

and appers the msg in one Channel(NEW CHANNEL)

(The channel access= 5+).
(If there is nobody online, msg is filed.
Ex Filed: Hyes [9]: Suggestion(FILED): Put new stages
 
PHP:
function onSay(cid, word, param)
    if param ~= "" then 
        doWriteLogFile("data/logs/sugestion.txt", " ".. getCreatureName(cid) .." ["..getPlayerLevel(cid).."]: Suggestion(FILED): "..param.."")
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your sugestion has been sended.")
    else
        doPlayerSendCancel(cid, "Please write sugestion.")
    end
return true
end
?
 
Code:
function onSay(cid, words, param, channel)
	if param == "" then
		return doPlayerSendTextMessage(cid, 27, "Command param required.")
	end
	for _, pid in ipairs(getPlayersOnline()) do
		while getPlayerAccess(pid) >= 5 do
			doPlayerSendChannelMessage(cid, getCreatureName(cid), param, 27, 2)
		end
	end
	return true
end
 
Back
Top