• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

How to use this function?

Serginov

Onkonkoronkonk
Joined
Jun 28, 2008
Messages
1,321
Reaction score
18
Location
Sweden - Dalarna
How do I use this function?
LUA:
doPlayerSendChannelMessage(cid, author, message, SpeakClasses, channel)
I mean what should I write in author, SpeakClasses?
and if I choose channel - Deaths - Will it say it in the Deaths chanel than?
 
@zonet
You:
LUA:
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)

if isPlayer(lastHitKiller) == TRUE then
        doPlayerSendChannelMessage(cid, "Auto Message -", " "..getCreatureName(cid).."["..getPlayerLevel(cid).."] just got killed by "..getCreatureName(lastHitKiller).."["..getPlayerLevel(lastHitKiller).."](Player)", TALKTYPE_CHANNEL_O, 10)
elseif isMonster(lastHitKiller) == TRUE then
        doPlayerSendChannelMessage(cid, "Auto Message -", " "..getCreatureName(cid).."["..getPlayerLevel(cid).."] just got killed by "..getCreatureName(lastHitKiller).."(Monster)", TALKTYPE_CHANNEL_O, 10)
else
        doPlayerSendChannelMessage(cid, "Auto Message -", " "..getCreatureName(cid).."["..getPlayerLevel(cid).."] just got killed by "..getCreatureName(lastHitKiller).."(?)", TALKTYPE_CHANNEL_O, 10)
                end
        return TRUE
end

Should be:
LUA:
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)

	if isPlayer(lastHitKiller) == TRUE then
		doPlayerSendChannelMessage(cid, "Auto Message -", " "..getCreatureName(cid).."["..getPlayerLevel(cid).."] just got killed by "..getCreatureName(lastHitKiller).."["..getPlayerLevel(lastHitKiller).."](Player)", TALKTYPE_CHANNEL_O, 10)
	elseif isMonster(lastHitKiller) == TRUE then
		doPlayerSendChannelMessage(cid, "Auto Message -", " "..getCreatureName(cid).."["..getPlayerLevel(cid).."] just got killed by "..getCreatureName(lastHitKiller).."(Monster)", TALKTYPE_CHANNEL_O, 10)
	else
		doPlayerSendChannelMessage(cid, "Auto Message -", " "..getCreatureName(cid).."["..getPlayerLevel(cid).."] just got killed by "..getCreatureName(lastHitKiller).."(?)", TALKTYPE_CHANNEL_O, 10)
	end
	
	return TRUE
end
 
Hello all, I want to make a channel where polish player can cheat with each other like german player and english player ;D

Well this roxx and I thought they should be called: English Chat/German Chat/Polish Chat


How to do this? And if a player opened the channel, he will receive a message: Only the language English/Polish/German, remember that! Have a nice day. But it should be as a text message.

Hope you guys understand me :D:thumbup::thumbup:


Of course I would rep YOU for this work;)


Edit: Sorry your all messages are so confusing me so I can't understand that all and whats right/wrong so please...try to solve my problem :)
 
I have added in creaturescripts.xml this line:
Code:
	<event type="death" name="DeathsChannel" event="script" value="deaths_channel.lua"/>
And in deaths_channel.lua Zonet's script and it's not working ;/;/. No errors in console.
 
Back
Top