why wont this /mute time work
#2

Firstly, you have such unacceptable condition:
pawn Код:
if(seconds != 0)
{
...
}
else if(seconds >= 0)
{
...
}
It won't work because all numbers except for 0 will lead to the first 'case' and 0 will lead to the second case. But the first case do not use the timer at all. And in the second case the timer will be triggered after 0 seconds.

Secondly, you don't actually mute the player. You just say that he is muted now. For example, the easiest way is to keep flags iMuted[MAX_PLAYERS] that says if the player is muted, and set it to 1 in mute and set it to 0 in unmute. And then you have to return 0 in the beginning of OnPlayerText and return 1 in the beginning of OnPlayerCommandText if the flag is setted to 1.
Reply


Messages In This Thread
why wont this /mute time work - by AIped - 04.02.2014, 18:41
Re: why wont this /mute time work - by Borg - 04.02.2014, 19:19
Re: why wont this /mute time work - by AIped - 04.02.2014, 19:52
Re: why wont this /mute time work - by Borg - 04.02.2014, 19:58
Re: why wont this /mute time work - by AIped - 04.02.2014, 20:14

Forum Jump:


Users browsing this thread: 1 Guest(s)