Re: Lua sleep() [message #450342 is a reply to message #450339] |
Sat, 30 July 2011 11:33 |
|
Intradox
Messages: 60 Registered: February 2011 Location: United States
Karma:
|
Recruit |
|
|
I'm doing it as global thing, not so each player has different music playing, which sounds like what you want me to do. So I attached it to a daves arrow, and it plays the first song, but it doesn't go onto the next song.
function Jukebox:Timer_Expired()
if song == nil then
song = 0
end
if playlist[song + 1] ~= nil then
song = song + 1
else
song = 1
end
InputConsole("msg [DarkEVA]: Now playing %s.", playlist[song])
currentsong = playlist[song]
players = Get_All_Players()
for i = 1, #players do
pID = FindPlayerName("FindID", players[i])
music = Players[Get_Player_Name_By_ID(pID)]
if music == "on" then
InputConsole("musicp %d %s", pID, playlist[song])
end
end
Start_Timer(ID, obj, playlisttimes[song], 1)
end
For the Start_Timer, what would I have to put for ID and obj? I think this is where its messed up.
Not pro enough at renegade to snipe.
[Updated on: Sat, 30 July 2011 11:50] Report message to a moderator
|
|
|