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

Messages only player with premium account

Lua:
--Pirate server--
--By; Gugah--
function onThink(interval, lastExecution)
 local Online = getPlayersOnline()
 local msgtype = MESSAGE_INFO_DESCR --Here u put the msg type.
 local msg =  "Messeger." -- Here is the message.
  for pid = 1, #Online do
    if isPremium then
   doPlayerSendTextMessage(Online[pid], msgtype, msg)
  else
    return true
  end
  end
 return true
end

put on globalevents.xml
PHP:
	<globalevent name="servemsg" interval="1000" event="script" value="scriptname.lua"/>

I have't tested.
 
@up bugas
fix
Code:
local msgtype = MESSAGE_INFO_DESCR
local msg =  "Message"
 
function onThink(interval, lastExecution)
    for _, pid in ipairs(getOnlinePlayers()) do
        if isPremium(cid) then
            doPlayerSendTextMessage(pid, msgtype, msg)
        end
    end
 return true
end
 
@up bugas
fix
Code:
local msgtype = MESSAGE_INFO_DESCR
local msg =  "Message"
 
function onThink(interval, lastExecution)
    for _, [B][COLOR="Blue"]pid[/COLOR][/B] in ipairs(getOnlinePlayers()) do
        if isPremium([B][COLOR="Red"]cid[/COLOR][/B]) then
            doPlayerSendTextMessage(pid, msgtype, msg)
        end
    end
 return true
end
veri bugas
 
bugas..
Fix :D
Code:
local msgtype = MESSAGE_INFO_DESCR
local msg =  "Message"
 
function onThink(interval, lastExecution)
    for _, pid in ipairs(getOnlinePlayers()) do
        if isPremium(pid) then
            doPlayerSendTextMessage(pid, msgtype, msg)
        end
    end
 return true
end
 
Lua:
local t = 
{
	message = "Yayaya!",
	type = MESSAGE_STATUS_CONSOLE_ORANGE
{

function onThink(interval, lastExecution)

	for _, pid in ipairs(getPlayersOnline()) do
		if isPremium(pid) then
			doPlayerSendTextMessage(pid, t.type, t.message)
		end
	end
	return true
end
 
Back
Top