function frog( ply )
barrel=ents.Create("prop_physics")
barrel:SetModel("models/props_2fort/frog.mdl")
barrel:SetPos(ply:GetEyeTrace().HitPos)
barrel:Spawn()
barrel:SetColor( 0, 255, 0, 150)
barrel:EmitSound("Ravebreak.mp3")
barrel:Fire("sethealth","10",10)
end
concommand.Add("ravefrog", frog)
------------------------------------------------------------------
i Have This Script i made. and i was Wordering how to make a Timer So That it Changes to A random Color like evert Second.
And So that When i Delete it. then The Sound Stop PLaying
Please Help<3
[highlight](User was banned for this post ("Wrong section" - mahalis))[/highlight]
[QUOTE=Entoros;19509972][code]timer.Create(barrel:EntIndex().." Color Change",1,0,function()
barrel:SetColor( math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255) )
end)
[/code][/QUOTE]
Thanks i Tryed To make it
timer.Create( "Timer", 10, 0, function()
barrel:SetColor( math.random(0,255), math.random(0,255), math.random(0,255), 255)
end )
That makes it change every 10 seconds forever. 10 = time, 0 = repetitions (or infinity).
Sorry, you need to Log In to post a reply to this thread.