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

Item exhaustion/timer

wesoly136

Member
Joined
Jul 30, 2009
Messages
562
Reaction score
9
Hi!
I made a catapult and I need a code that the catapult may be use only once for xx minutes. Not by one player. At all.
Sorry for my bad English :S
 
Code:
if getPlayerStorageValue(cid, 3413) <= os.time() then
	doSomething()
	setPlayerStorageValue(cid, 3413, os.time() + 60) --- 60 = 1 minute
else
	doPlayerSendTextMessage(cid, 27, getPlayerStorageValue(cid, 3413) - os.date("%M", os.time()) .. "")
end
like this?
 
for all players u mean?
?;
Code:
if getGlobalStorageValue(53431) <= os.time() then
	doSomething()
	setGlobalStorageValue(53431, os.time() + 60)
end
 
Back
Top