iFoReX Posted June 8, 2013 Share Posted June 8, 2013 Quiero Hacer Un Script De Anuncios Con Math.random & Un Timer Como Lo Hago ? ( Se Me Olvido Como Usar El Math.random ) :C Link to comment
FraN-724 Posted June 8, 2013 Share Posted June 8, 2013 Un Ejemplo local lista = { "Si necesitas ayuda, Presiona F9", } setTimer ( function() outputChatBox('Server:'..lista [ math.random ( lista[1,#lista] ])) addEventHandler ( "onClientRender", root ) setTimer ( function ( ) removeEventHandler ( "onClientRender", root ) end, 10000, 1) end, 15000,0) Link to comment
iFoReX Posted June 8, 2013 Author Share Posted June 8, 2013 Me Da Error En La Linea 9 local lista = { "Jugadores Online: #ffd200"..tostring(#players).." #ffffff/ #ffd20032", "Visita Nuestro Foro: #ffd200www.fgpmta.com", "Lideres Del Clan: #ffd200Viper - elMota", "Buymap: #ffd200'u' - #FFFFFFHidden:#ffd200 'o'", } setTimer ( function() outputChatBox('#ffd200[FgP]: #ffffff'..lista [ math.random ( lista[1,#lista] )],0,0,0,true) addEventHandler ( "onClientRender", root ) setTimer ( function ( ) removeEventHandler ( "onClientRender", root ) end, 10000, 1) end, 15000,0) Link to comment
Alexs Posted June 8, 2013 Share Posted June 8, 2013 local lista = { "Jugadores Online: #ffd200"..tostring(#players).." #ffffff/ #ffd20032", "Visita Nuestro Foro: #ffd200www.fgpmta.com", "Lideres Del Clan: #ffd200Viper - elMota", "Buymap: #ffd200'u' - #FFFFFFHidden:#ffd200 'o'" } setTimer ( outputChatBox, 1500, 0, "#ffd200-[FgP]- #ffffff"..lista[ math.random( 1, #lista )], 0, 0, 0, true ) Link to comment
iFoReX Posted June 8, 2013 Author Share Posted June 8, 2013 Le Puse Mas Tiempo & Ahora No Aparece D: local lista = { "Visita Nuestro Foro: #ffd200www.fgpmta.com", "Lideres Del Clan: #ffd200Viper - elMota", "Buymap: #ffd200'u' - #FFFFFFHidden:#ffd200 'o'" } setTimer ( outputChatBox, 20000, 0, "#ffd200-[FgP]- #ffffff"..lista[ math.random( 1, #lista )], 0, 0, 0, true ) Link to comment
Castillo Posted June 8, 2013 Share Posted June 8, 2013 local lista = { "Jugadores Online: #ffd200"..tostring(#players).." #ffffff/ #ffd20032", "Visita Nuestro Foro: #ffd200www.fgpmta.com", "Lideres Del Clan: #ffd200Viper - elMota", "Buymap: #ffd200'u' - #FFFFFFHidden:#ffd200 'o'" } setTimer ( outputChatBox, 1500, 0, "#ffd200-[FgP]- #ffffff"..lista[ math.random( 1, #lista )], 0, 0, 0, true ) local lista = { "Visita Nuestro Foro: #ffd200www.fgpmta.com", "Lideres Del Clan: #ffd200Viper - elMota", "Buymap: #ffd200'u' - #FFFFFFHidden:#ffd200 'o'" } setTimer ( function ( ) outputChatBox ( "#ffd200-[FgP]- #ffffff".. lista [ math.random ( 1, #lista ) ], root, 0, 0, 0, true ) end ,20000, 0 ) Si no usas una funcion, te dara siempre el mismo mensaje. Link to comment
Recommended Posts