• 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 Event onSay not found.

sdog1234

New Member
Joined
Dec 18, 2010
Messages
17
Reaction score
4
Code:
local notallowed = {100-385}-- Items not allowed to destroy
function onUse(cid, item, frompos, item2, topos)
local destroyitem
 
	if getPlayerAccess(cid) > 4 then
 
		for i = 1, 255 do
 
 
			destroyitem = getThingfromPos({x=topos.x, y=topos.y, z=topos.z, stackpos=i})
			if destroyitem.itemid > 0 then
				if not(isInArray(notallowed,destroyitem.itemid)) then
				doRemoveItem(destroyitem.uid,100)	
			end
		end
 
		end
		else
		doPlayerSendCancel(cid,"You cannot execute this command.")
		return false
	end
 
	return true
end


I want this to be a talkaction for my 8.0 server evolutions, not a rune. Could someone make that happen?
The error I get for this is: Warning: [Event::loadscript] Event onSay not found.
 
Code:
function onSay(cid, words, param)
local notallowed = {100-385}-- Items not allowed to destroy
local destroyitem
 
	if getPlayerAccess(cid) > 4 then
 
		for i = 1, 255 do
 
 
			destroyitem = getThingfromPos({x=topos.x, y=topos.y, z=topos.z, stackpos=i})
			if destroyitem.itemid > 0 then
				if not(isInArray(notallowed,destroyitem.itemid)) then
				doRemoveItem(destroyitem.uid,100)	
			end
		end
 
		end
		else
		doPlayerSendCancel(cid,"You cannot execute this command.")
		return false
	end
 
	return true
end
 
Back
Top