• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Enabling a part of table

Santi

Theres no way im stopping
Joined
Aug 29, 2010
Messages
1,975
Reaction score
152
Location
00
LUA:
local t = {
[1233] = {storage = 7890, level = {{enable = true, level = 50}}}
}

for k, v in pairs(t) do
if getPlayerStorageValue(cid,v.storage) < 0 then
   if v.level.enable == false then
      doPlayerAddExp(cid,99)
   else
       if getPlayerLevel(cid) >= v.level.level then
          doPlayerAddExp(cid,100)
       end
   end
end

Am I using the enable = true part correctly? the level thing correctly too?
(I know script doesnt make any sense and its probably bugged, just wondering how to make that)
Thanks in advanced and of course rep+ ^_^
 
What should be wrong?
LUA:
local t = {
	[1233] = {storage = 7890, level = {{enable = true, level = 50}}}
}
 
for k, v in pairs(t) do
	if getPlayerStorageValue(cid,v.storage) < 0 then
	   if not(v.level.enable) then
		  doPlayerAddExp(cid,99)
	   else
		   if getPlayerLevel(cid) >= v.level.level then
			  doPlayerAddExp(cid,100)
		   end
	   end
	end
end
 
Back
Top