hey guys can someone help me with the timer
im trying to make a timer for sound 50010 for 1 sec but it does nothing
this is my sound script
NewTimer("player.PlaySound", 1000, 1);
player.PlaySound(50010);
seems my script is wrong
you can edit your sound and you can make it 1second you don't have to script it
Quote from: KrooB on Jul 31, 2019, 12:48 AMyou can edit your sound and you can make it 1second you don't have to script it
Bad advice.
On the topic note, you are using the timer wrong, you have to provide a function to the time in the first param.
function PlaySoundForPlayer(playerID, soundID) {
local player = FindPlayer(playerID);
if(!player) return;
player.PlaySound(soundID);
}
NewTimer("PlaySoundForPlayer", 1000, 1, player.ID, sound_id);
Quote from: Doom_Kill3R on Jul 31, 2019, 05:27 AMQuote from: KrooB on Jul 31, 2019, 12:48 AMyou can edit your sound and you can make it 1second you don't have to script it
Bad advice.
On the topic note, you are using the timer wrong, you have to provide a function to the time in the first param.
function PlaySoundForPlayer(playerID, soundID) {
local player = FindPlayer(playerID);
if(!player) return;
player.PlaySound(soundID);
}
NewTimer("PlaySoundForPlayer", 1000, 1, player.ID, sound_id);
Thank you very much for helping me out for the sound timer btw it works :D 8)
Im going to mark this topic as solved
Quote from: Doom_Kill3R on Jul 31, 2019, 05:27 AMQuote from: KrooB on Jul 31, 2019, 12:48 AMyou can edit your sound and you can make it 1second you don't have to script it
Bad advice.
as u wish but it's same thing ;D ;D