<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/ES/Delay?action=history&amp;feed=atom</id>
	<title>ES/Delay - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/ES/Delay?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/Delay&amp;action=history"/>
	<updated>2026-04-04T17:31:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/Delay&amp;diff=69208&amp;oldid=prev</id>
		<title>Myonlake: Myonlake moved page Es/Delay to ES/Delay</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/Delay&amp;diff=69208&amp;oldid=prev"/>
		<updated>2021-02-21T19:00:37Z</updated>

		<summary type="html">&lt;p&gt;Myonlake moved page &lt;a href=&quot;/wiki/Es/Delay&quot; class=&quot;mw-redirect&quot; title=&quot;Es/Delay&quot;&gt;Es/Delay&lt;/a&gt; to &lt;a href=&quot;/wiki/ES/Delay&quot; title=&quot;ES/Delay&quot;&gt;ES/Delay&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:00, 21 February 2021&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-63086:rev-69208 --&gt;
&lt;/table&gt;</summary>
		<author><name>Myonlake</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/Delay&amp;diff=63086&amp;oldid=prev</id>
		<title>ClawSuit: ClawSuit moved page Delay to Es/Delay</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/Delay&amp;diff=63086&amp;oldid=prev"/>
		<updated>2019-06-24T17:09:15Z</updated>

		<summary type="html">&lt;p&gt;ClawSuit moved page &lt;a href=&quot;/index.php?title=Delay&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Delay (page does not exist)&quot;&gt;Delay&lt;/a&gt; to &lt;a href=&quot;/wiki/Es/Delay&quot; class=&quot;mw-redirect&quot; title=&quot;Es/Delay&quot;&gt;Es/Delay&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:09, 24 June 2019&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-63084:rev-63086 --&gt;
&lt;/table&gt;</summary>
		<author><name>ClawSuit</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/Delay&amp;diff=63084&amp;oldid=prev</id>
		<title>ClawSuit: Created page with &quot;{{Useful Function}} Esta Funcion nos sirve para dar un retraso entre una linea de codigo y la(s) siguiente(s)  ==Sintaxis== &lt;syntaxhighlight lang=&quot;lua&quot;&gt;bool delay(func, time,...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/Delay&amp;diff=63084&amp;oldid=prev"/>
		<updated>2019-06-24T17:07:27Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Useful Function}} Esta Funcion nos sirve para dar un retraso entre una linea de codigo y la(s) siguiente(s)  ==Sintaxis== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool delay(func, time,...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Useful Function}}&lt;br /&gt;
Esta Funcion nos sirve para dar un retraso entre una linea de codigo y la(s) siguiente(s)&lt;br /&gt;
&lt;br /&gt;
==Sintaxis==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool delay(func, time, ...)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Argumentos Requeridos===&lt;br /&gt;
* '''func''': Debe ir la funcion en donde se situara el delay.&lt;br /&gt;
* '''time''': El tiempo que durara el delay.&lt;br /&gt;
* '''( ... )''': Los argumentos que se guardaran de la funcion.&lt;br /&gt;
&lt;br /&gt;
== Notas ==&lt;br /&gt;
PD : Si Piensa utilizar esto debe agregar un delay minimo al inicio del todo.&lt;br /&gt;
----PD 2: Suele mandar un warning a la primera ejecucion pero es normal, no causa problemas.&lt;br /&gt;
&lt;br /&gt;
==Codigo==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Guión Compartido&amp;quot; class=&amp;quot;shared&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local co = {}&lt;br /&gt;
function delay(func, time, ...)&lt;br /&gt;
	local arg = {...}&lt;br /&gt;
	if not co[tostring(func)] then&lt;br /&gt;
		co[tostring(func)] = coroutine.create(func)&lt;br /&gt;
		setTimer(function()&lt;br /&gt;
			coroutine.resume(co[tostring(func)], unpack(arg))&lt;br /&gt;
		end,time,1)&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	setTimer(function()&lt;br /&gt;
		coroutine.resume(co[tostring(func)], unpack(arg))&lt;br /&gt;
	end,time,1)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Ejemplo==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--[[Si utilizaremos delay en alguna funcion antes que nada al inicio &lt;br /&gt;
de esta tiene q haber un delay de 50 para que esta se configure de igual forma teneis&lt;br /&gt;
que meter los argumentos a utilizar en el primer delay para que esta se le guarden los datos: por ejemplo]]&lt;br /&gt;
function cuenta_regresiva(player)&lt;br /&gt;
	player = (player.type ~= 'player' and Player.getRandom()) or player&lt;br /&gt;
	delay(cuenta_regresiva, 50, player) &lt;br /&gt;
	coroutine.yield()&lt;br /&gt;
&lt;br /&gt;
	player:outputChat('3...')&lt;br /&gt;
&lt;br /&gt;
	delay(cuenta_regresiva, 1000) &lt;br /&gt;
	coroutine.yield()&lt;br /&gt;
&lt;br /&gt;
	player:outputChat('2...')&lt;br /&gt;
&lt;br /&gt;
	delay(cuenta_regresiva, 1000) &lt;br /&gt;
	coroutine.yield()&lt;br /&gt;
&lt;br /&gt;
	player:outputChat('1...')	&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getRootElement(), cuenta_regresiva)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Author'': ClawSuit&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>ClawSuit</name></author>
	</entry>
</feed>