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

do something when a private message is received

dhrsantan

A.K.A Lbakiller
Joined
Nov 27, 2014
Messages
94
Reaction score
10
Location
The netherlands
How can I do a certain action if my character receives lets say, a private message.

As I'd like to make a mod that plays a sound notification upon receiving a pm or a broadcast etc.
 
Code:
function init()
   connect(g_game, 'onTextMessage', getParams)
   connect(g_game, { onGameEnd = terminate} )
end

function getParams(mode, text)
    if not g_game.isOnline() then return end
       
    if mode == """"MODE""" then
        
    end
end
 
Back
Top