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

TalkAction /globalstorage

iKaS

Member
Joined
May 9, 2009
Messages
217
Reaction score
16
Location
Barcelona
Hi,

this is a very simple but useful talkaction.

Description:
This talkations works like /storage but using globalstorages instead of player storage.
Can be useful to see if events or games works (only if use globalstorages)

data/talkactions/talkactions.xml
XML:
<talkaction log="yes" words="/globalstorage" access="3" event="script" value="globalstorage.lua"/>
data/talkactions/scripts, create a file called globalstorage.lua
Lua:
function onSay(cid, words, param)
	local t = string.explode(param, ",")
	if(not t[1]) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
		return true
	end
	if(not t[2]) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Global Storage: "..param..", Value: "..getGlobalStorageValue(t[1]))
		return true
	else
		setGlobalStorageValue(t[1], t[2])
	end
	return true
end
 
Last edited:
Back
Top