Jump to content

probem with mute timer


Andreas.

Recommended Posts

hello, i have a problem with removing a mute after given time.

server

setTimer(setPlayerMuted, timeAmount, 1, chosenPlayer, false) 

client

local timeAmount = guiGetText(gui.edit[1]) 

why do I get un-muted directly?

I trigger the "timeAmount" so that's not the problem, nothing in debug either and

outputChatBox(timeAmount) 

outputs the time given in the edit

Link to comment

solved; it was because timer was set to "0" not "1"

but how can I make the "timeAmount" in minutes, not miliseconds

EDIT: Solved it by using:

local seconds = 60000 * timeAmount 
outputChatBox(seconds) 
setTimer(setPlayerMuted, seconds, 1, chosenPlayer, false) 
outputChatBox("Muted for "..time.."  minutes") 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...