Sky multicolor Attention aux épileptiques !
Message
Music
Credits
Water multicolor
- Code:
function yo()
setSkyGradient ( math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255), math.random (0,255) )
end
setTimer ( yo, 100, 0 )
Message
- Code:
function startclient ()
outputChatBox ( "[BOT]Script by Serialkiller" , 255, 255, 255, true )
end
addEventHandler( "onClientResourceStart", getRootElement(), startclient )
Music
- Code:
function startMusic()
setRadioChannel(0)
song = playSound("musique.mp3",true)
outputChatBox("[BOT] Press M to stop/start the musique")
end
function makeRadioStayOff()
setRadioChannel(0)
cancelEvent()
end
function toggleSong()
if not songOff then
setSoundVolume(song,0)
songOff = true
removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff)
else
setSoundVolume(song,1)
songOff = false
setRadioChannel(0)
addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff)
end
end
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic)
addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff)
addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff)
addCommandHandler("musicmusic",toggleSong)
bindKey("m","down","musicmusic")
addEventHandler("onClientResourceStop",getResourceRootElement(getThisResource()),startMusic)
Credits
- Code:
function createCredits()
GUIEditor_Label = {}
local sx,sy = 340,166
local x,y = guiGetScreenSize()
local ax,ay = x/2 - sx/2, y/2 - sy/2
wdw_credits = guiCreateWindow(ax,ay,520,220,"Credits",false)
guiWindowSetSizable ( wdw_credits, false )
guiWindowSetMovable ( wdw_credits, false )
GUIEditor_Label[1] = guiCreateLabel(38,39,340,166,"Script by Serialkiller to =KoG= Server !",false,wdw_credits)
guiLabelSetColor(GUIEditor_Label[1],255,255,255)
guiLabelSetVerticalAlign(GUIEditor_Label[1],"top")
guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false)
guiSetFont(GUIEditor_Label[1],"default-bold-small")
btn_hide = guiCreateButton(0.7355,0.7883,0.2008,0.1396,"Back",true,wdw_credits)
guiSetVisible(wdw_credits,false)
addEventHandler("onClientGUIClick",btn_hide,
function(button)
hideCredits()
end,
false)
end
function destroyCredits()
destroyElement(wdw_credits)
showCursor(false)
end
function showCredits()
guiSetVisible(wdw_credits,true)
showCursor(true)
end
function hideCredits()
guiSetVisible(wdw_credits,false)
showCursor(false)
end
function onStart()
outputChatBox("Press 'c' to open the Credits")
createCredits()
bindKey("c","down",showCredits)
end
addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), onStart)
function onStop()
destroyCredits()
end
addEventHandler( "onClientResourceStop", getRootElement(), onStop)
Water multicolor
- Code:
function ah()
setWaterColor(math.random (0,255), math.random (0,255), math.random (0,255))
end
setTimer ( ah, 100, 0 )
addEventHandler ( "onResourceStart", root, ah )