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

Broadcaster

Joined
Jun 22, 2010
Messages
268
Solutions
1
Reaction score
5
Location
Usa, Utah
can anyone help fix this script? its for aries 8.1 xml
i get the error LuaDoPlayerSay<>. Player not found


Lua:
local listcost = 1

function onSay(cid, words, param)
local name = getCreatureName(cid)
if(param == "") then
return TRUE
end
if ((isPlayer(cid) == 1) and doPlayerRemoveItem(cid, 7910, 1)) == TRUE then
doPlayerSay("["..name.."]: "..param, MESSAGE_EVENT_ADVANCE)
else
doPlayerSendCancel(cid, "You need "..listcost.."epic peanut to broadcast a message. ")
return FALSE
end
end
 
Rep++

But are you sure that "MESSAGE_EVENT_ADVANCE" works as type? You should replace it with: TALKTYPE_MONSTER or 19

Tabbed and should work:
Code:
local listcost = 1
 
function onSay(cid, words, param)
	local name = getCreatureName(cid)
	
	if(param == "") then
		return TRUE
	end

	if ((isPlayer(cid) == 1) and doPlayerRemoveItem(cid, 7910, 1)) == TRUE then
		doPlayerSay(cid, "["..name.."]: "..param, MESSAGE_EVENT_ADVANCE)
	else
		doPlayerSendCancel(cid, "You need "..listcost.."epic peanut to broadcast a message. ")
	end

	return TRUE
end
 
Back
Top