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

Compiling Force talkaction

debouas

New Member
Joined
Aug 14, 2015
Messages
44
Reaction score
0
I had seen it somewhere

I need a function to use to force player use talkaction

For player say

For exemple:
Code:
forcecommand('!online')
 
Might want to explain the problem your having a little better, also include the server version, not the client :)
 
doCreatureExecuteTalkAction(cid, text[, ignoreAccess = false[, channelId = CHANNEL_DEFAULT]])
Code:
doCreatureExecuteTalkAction(cid, "!online")

Don't work my friend :(

m9GDjJr.png
 
It's already implemented, is what Limos is trying to say.
Use it in any script.
a simple login function, works perfectly.
Code:
function onLogin(cid)
  doCreatureExecuteTalkAction(cid, "!online", true)
  return true
end
 
It's already implemented, is what Limos is trying to say.
Use it in any script.
a simple login function, works perfectly.
Code:
function onLogin(cid)
  doCreatureExecuteTalkAction(cid, "!online", true)
  return true
end

But he want use it on sources, not in LUA scripts
 
yeayeah

It's possible? Any know?
If you don't know c/c++ then it won't be possible for you to implement it especially since the function already exists in script format there is no point trying to ad it to the sources, especially if your not giving us any reason to implement it.

Why don't you tell us the reason you want it added to the sources and then maybe someone can help you with what your trying to accomplish

Also if you want to call this function forcecommand(text) then you can define forcecommand(text) as a local function inside of onSay and call doCreatureExecuteTalkAction(cid, text) within forcecommand.
Code:
function onSay(cid, words, param)
    local function forcecommand(text)
        doCreatureExecuteTalkAction(cid, text, true)
    end

    forcecommand("!online")
end

If it is defined anywhere outside of onSay then you need to pass cid to forcecommand, e.g. forcecommand(cid, text), which would defeat the purpose of re-writing the function.
 
Back
Top