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

tabble with storage

Critico

Sexy
Joined
Mar 25, 2010
Messages
370
Reaction score
179
I need to do to check if it has the storage

Code:
local t = {
[17103] = 'thais',
[17102] = 'temple'
}

        for k, v in pairs(t) do
	if getPlayerStorageValue(cid,v) >= 1 then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'city '..v)
        else
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'you do not have city.')
        end
        break
        end

storages is 17103 and 17102
 
LUA:
--Script made by GarQet--

	local t = {
		[17103] = {name = thais},
		[17102] = {name = temple}
	}
	
function onSay(cid, words, param, channel, frompos, topos)
	for k, v in pairs(t) do
		if(getPlayerStorageValue(cid, k) >= 1 then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "city ".. v.name ..".")
        else
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'you do not have city.')
        end
	end
	break
end
 
Back
Top