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

Lua Script for send item to all player's online.

bolero

MikeHere
Joined
Apr 13, 2009
Messages
1,146
Reaction score
12
Location
Venezuela
I need 1 script when I say... /send "idofitem" this id (item) send to all players were are online please! :rolleyes:
 
LUA:
function onSay(cid, words, param, channel)
	param = tonumber(param)
	if not param then
		return doPlayerSendCancel(cid, 'Invalid ID.')
	end

	for _, pid in ipairs(getPlayersOnline()) do
		if pid ~= cid then
			doPlayerAddItem(pid, param, 1)
		end
	end

	return true
end
 
Doesn't work, you can add this?.. I need too when I send the item this can see for all players in red color in the screen and..

Need to put the ammount too...

Example:

/send 2160,1 >>>>> and after say the message in red in all players.
 
LUA:
local message = {
	
"Every player of the server won this item!",
}

function onSay(cid, words, param, channel)
	param = tonumber(param)
	if not param then
		return doPlayerSendCancel(cid, 'Invalid ID.')
	end
 
	for _, pid in ipairs(getPlayersOnline()) do
		if pid ~= cid then
			doPlayerAddItem(pid, param, amount)
                        doBroadcastMessage("Informação: " .. message .. "", MESSAGE_INFO_DESCR)
		end
	end
 
	return true
end

not tested
 
Back
Top