• 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 little help with onTalk script

Tegardee

The Boss
Joined
Jun 18, 2014
Messages
106
Reaction score
0
Location
Brazil
hello guys, I installed the function "onTalk" in my sources, it works ok. but I tried to create with this function.

I want when the player with access high than 3 talk, says in RED COLOR, and when a player with access == 3 talk, says in ORANGE COLOR, but when I try to talk with this script, appear "C: stack overflow" on the exe.

currently script is the following.

Code:
function onTalk(cid, type, text, position)
    if getPlayerAccess(cid) > 3 then
  return doCreatureSay(cid, text, TALKTYPE_RED_1)
  elseif getPlayerAccess(cid) == 3 then
  doCreatureSay(cid, text, TALKTYPE_ORANGE_1)
  elseif getPlayerAccess(cid) < 3 then
  return true
  end
  return true
end

thanks for the help guys.

I use TFS 0.4 r3777
 
1st off why would you install something you don't know how to use, 2nd why install something that already exists and has most likely existed since the dawn of this community?
 
Back
Top