mob/GH
verb
Mute(mob/M in world, Reason as text)
set category = "Admin"
set desc = "Reason"
if(M.client)
Muted = 1
world<<"<font color = #FFFC17>Announcement: </font color>[M] has been Muted by [src] for [Reason]"
else
usr<<"You cant mute him Dumass"
ID:158909
![]() Jun 12 2009, 12:36 am
|
|
I have this Mute verb that i made but im not sure on how to add Timing. Like say i wanted to mute them for a max of 300 minutes and minimum of 1. How would i make such a verb? Also so if they Relog the Mute is still active
|
There are a couple of methods you can use to go about this, with varying results. Basically, you need to keep either the time the player still has to wait to become unmuted, or the time (timestamp) when the player should become unmuted. And for it to be kept across relogs, save it, and when loading/logging in, check it and start the timer again if needed.
Here's a short illustration of the 2 methods mentioned above: //keeping time until unmute: //keeping timestamp to be unmuted at: Again, to make it persist across relogins, you'd just save & load the mute-var, and after a player relogins, if his var indicates he still has muting time left, restart the mute timer. |
http://www.byond.com/developer/ACWraith/Timer
in this he has start timer, pause , unpause and clear for that matter.
start timer shows how you can start the time on your mute verb. pause and unpause shows how you can make it so that when they log off and in again after a while, still are muted.
using pause where its apropriate for the logout and unpause on login.
if needed i guess you could set clear timer to run when the mute is finished.