• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Give Player Random Items

Iranimes

Lua Zawodowiec
Joined
Jul 10, 2012
Messages
717
Reaction score
12
Lua:
function givePlayerRandomItem(cid, items, counts)
	los = math.random(1, #items)
	x = items[los]
	y = counts[los]
	doPlayerAddItem(cid, x, y)
end

example:
givePlayerRandomItem(cid, {23232, 3123, 13123}, {1, 1, 5})
 
Back
Top