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

cheking the slots of a backpack

Tarielle

New Member
Joined
Nov 4, 2007
Messages
214
Reaction score
0
Location
Sweden
hi, Im trying to do this thing that adds a item to the player, but I'd like it to like "not add" it if there is no space in the backpack (or slots at the equipment)

thanks
 
PHP:
local count
	for count=0, AMMOUNT-1 do
	local result = doPlayerAddItem(cid, ITEM, SUBTYPE, 0)
	if(result == -1) then
		if(count == 0) then
			return FALSE
		end
	end
	end
return TRUE
end

If you know what i mean. ;p
NOT TESTED!
 
it did work :)
but I still get problems in the console that the player wasn't found.
It's running that problem even though Im not even logged in

Edit:
Solved it, thanks alot :p
 
Last edited:
Back
Top