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

repeat event(still need help)

Doggynub

LUA / C++
Joined
Sep 28, 2008
Messages
2,541
Reaction score
186
what to do if i want to repeat event in action , movement etc..
so i want like addEvent(doCreateItem,1000,232,1,pos) every 10 sec ?
 
Code:
function repeat(id,count,pos,int)
	doCreateItem(id,count,pos)
	return addEvent(repeat,int,id,count,pos)
end
--and call the function in your script
--example
function onUse(cid)
    return repeat(someid, 1, somepos,interval)
end
 
just that you need to call it somthng else than <<repeat>>, and that it function well for the second time after that it spam creating item without refering to the interval of time
 

Similar threads

Back
Top