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

!aol command error

Shushuu

Banned User
Joined
Jun 29, 2011
Messages
37
Reaction score
0
hey everyone i got this aol script :
LUA:
function onSay(cid, words, param)
local preco = 10000
if doPlayerRemoveMoney(cid, preco) == TRUE then
doPlayerAddItem(cid,2173,1)
doSendMagicEffect(getPlayerPosition(cid),6)
doSendPlayerTextMessage(cid,"Você comprou um aol por 10k!",23)
else
doPlayerSendCancel(cid,"Você nao tem 10k.")
end
return TRUE
end

and when i buy !aol ingame i receive this error in distro

[Error - TalkAction Interface]
[11/07/2011 21:48:52] data/talkactions/scripts/aol.lua:onSay
[11/07/2011 21:48:52] Description:
[11/07/2011 21:48:52] data/talkactions/scripts/aol.lua:6: attempt to call global 'doSendPlayerTextMessage' (a nil value)
[11/07/2011 21:48:52] stack traceback:
[11/07/2011 21:48:52] data/talkactions/scripts/aol.lua:6: in function <data/talkactions/scripts/aol.lua:1>
 
Code:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) == TRUE then
doPlayerAddItem(cid, 2173, 1)
doSendMagicEffect(getPlayerPosition(cid), 31)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'There You Go!')
else
doPlayerSendCancel(cid, "You need 5 crystal coin to buy a Amulet Of Loss!")
end
return TRUE
end


add this on talkactions
<talkaction words="!aol" event="script" value="aol.lua" />




Repp ++ if you it work
 
Last edited:
easy 1
LUA:
function onSay(cid, words, param) 
        if doPlayerRemoveMoney(cid, 20000) == TRUE then 
doPlayerAddItem(cid, 2173, 2) 
                        doSendMagicEffect(getPlayerPosition(cid), 53) 
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You have bought an amulet of loss!!')  
else 
            doPlayerSendCancel(cid, "You need 2 crystal coin to buy a Amulet Of Loss!") 
                end 
return TRUE 
                end
 
Back
Top