• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Open backpack check gold

Beo

Three Magic
Joined
Aug 25, 2009
Messages
9,075
Solutions
1
Reaction score
857
A little script Cykotitan helped me with ^_^

When you open the backpack a red message will come up alerting you how much gold you have.

Only works with standard backpack, if you want to add more backpacks, its entirely up to you, just change the id of the backpack to replace 1988 [Brown Backpack].

This in Actions;
LUA:
	<action itemid="1988" script="other/NAMEOFSCRIPT.lua"/>

This in other;
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'You have ' .. getPlayerMoney(cid) .. ' gold.')
	return true
end


Screenshot;
wjhx0m.jpg



If you want the backpack to open in TFS 0.3 or higher, remove return true.
 
Last edited:
If you want the backpack to open in TFS 0.3 or higher, remove return true.
 
Hi, i got a problem.
I use tfs 0.29 client 8.7 and I see the message but can't open the backpack.
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'You have ' .. getPlayerMoney(cid) .. ' gold.')
end

Try this, not sure about 8.7 atm.
 
Back
Top