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

Solved Return true or return false

freaked1

Active Member
Joined
Jan 30, 2008
Messages
486
Solutions
5
Reaction score
29
Location
Sweden
Hello! This might not be the right place and there might be information about this but I don't find it.

What is the purpose of return true/false and is it needed for example to allow me to even click the thing in my code:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(getPlayerStorageValue(cid, 35161) <= 0) then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "true or false.")
        setPlayerStorageValue(cid, 35161, 1)
    elseif(getPlayerStorageValue(cid, 35161) >= 0 and getPlayerItemCount(cid, 00000) < 10) then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "false or true")
    elseif(getPlayerStorageValue(cid, 35161) >= 0 and getPlayerItemCount(cid, 0000) >= 10) then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "true or false")
        setPlayerStorageValue(cid, 35155, 1)
    end   
    return true
end
 
Solution
Yes true = the script is used pretty much, false = a poff is shown and I think the "sorry not posible" text is displayed aswell.
Yes true = the script is used pretty much, false = a poff is shown and I think the "sorry not posible" text is displayed aswell.
 
Solution

Similar threads

Back
Top