Hi,
this is a very simple but useful talkaction.
data/talkactions/talkactions.xml
data/talkactions/scripts, create a file called globalstorage.lua
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"/>
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: