unmute timer stop

Started by umar4911, Dec 08, 2017, 06:11 AM

Previous topic - Next topic

umar4911

I have mute system in which player mutes are 3 continues spam and a timer which unmutes it after 30 sec. when I use /unmute cmd, the player gets unmuted but when the timer ends, it again says player unmuted. How to make the timer stop.

P.S the name of function is unmute

=RK=MarineForce

Time Finished?

Example Umar4911 has been unmuted Reason Time Expire

umar4911

Quote from: =RK=MarineForce on Dec 08, 2017, 07:38 AMTime Finished?

Example Umar4911 has been unmuted Reason Time Expire
You did not understand
Suppose I am spamming chat. I am muted for spamming. Admin unmutes me using /unmute. After 30 sec, the Timer which was made for spamming again says Player Unmuted. I want a code that also breakes that timer

!

You need to see this

http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Timer.Delete

Method#1
Delete the timer while applying unmute command
For Method#2
Post your function which is used in timer when player's muted.


Discord: zeus#5155

Mohamed Boubekri

Me To Ihave Mute System But i Dont Have That's Problem But Try Thi:
else if ( cmd == "umute" )
{
if ( pstats[ player.ID ].Level < 5 ) MessagePlayer( "[#FF0000][INFO][#ffffff] You Are Not Authorized To use This Command", player );
else if ( !text ) MessagePlayer("[#ff0000][INFO][#ffffff] /umute <Player>",player);
else {
local plr = FindPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
else if ( pstats[ player.ID ].Level < 5 ) MessagePlayer( "[#FF0000][INFO][#ffffff] You Are Not Authorized To use This Command", player );
else
{
Message( "[#fff123]Administrator[#ffffff] " + player.Name + " Unmuted " + plr.Name + "" );
IsMuted[ plr.ID ] = false;
}
}
return 0;
}
else if ( cmd == "mute" )
{
if ( pstats[ player.ID ].Level < 5 ) MessagePlayer( "[#FF0000][INFO][#ffffff] You Are Not Authorized To use This Command", player );
else if ( !text ) MessagePlayer("[#ff0000][INFO][#ffffff] /mute <Player>",player);
else {
local plr = FindPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
else if( pstats[ player.ID ].Level < pstats[ plr.ID ].Level ) MessagePlayer("[#ff0000][ERROR][#ffffff] You Cannot Give Any Admin Higher Level Than You", player);
else
{
local reason = GetTok( text, " ", 2 );
if ( !reason ) reason = "None";
Message( "[#fff123]Administrator[#ffffff] " + player.Name + " Muted " + plr.Name + " Reason: " + reason + "" );
IsMuted[ plr.ID ] = true;
}
}
return 0;
}
If Dont Work Tell Me i WIll try to Help You :P
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

!

#5
Quote from: Mohamed on Dec 08, 2017, 12:23 PMMe To Ihave Mute System But i Dont Have That's Problem But Try Thi:
else if ( cmd == "umute" )
{
if ( pstats[ player.ID ].Level < 5 ) MessagePlayer( "[#FF0000][INFO][#ffffff] You Are Not Authorized To use This Command", player );
else if ( !text ) MessagePlayer("[#ff0000][INFO][#ffffff] /umute <Player>",player);
else {
local plr = FindPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
else if ( pstats[ player.ID ].Level < 5 ) MessagePlayer( "[#FF0000][INFO][#ffffff] You Are Not Authorized To use This Command", player );
else
{
Message( "[#fff123]Administrator[#ffffff] " + player.Name + " Unmuted " + plr.Name + "" );
IsMuted[ plr.ID ] = false;
}
}
return 0;
}
else if ( cmd == "mute" )
{
if ( pstats[ player.ID ].Level < 5 ) MessagePlayer( "[#FF0000][INFO][#ffffff] You Are Not Authorized To use This Command", player );
else if ( !text ) MessagePlayer("[#ff0000][INFO][#ffffff] /mute <Player>",player);
else {
local plr = FindPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
else if( pstats[ player.ID ].Level < pstats[ plr.ID ].Level ) MessagePlayer("[#ff0000][ERROR][#ffffff] You Cannot Give Any Admin Higher Level Than You", player);
else
{
local reason = GetTok( text, " ", 2 );
if ( !reason ) reason = "None";
Message( "[#fff123]Administrator[#ffffff] " + player.Name + " Muted " + plr.Name + " Reason: " + reason + "" );
IsMuted[ plr.ID ] = true;
}
}
return 0;
}
If Dont Work Tell Me i WIll try to Help You :P
Thanks for showing your interest towards this topic you saved someone's day.Everyone raise your hands and clap for this man.

Quote from: Mohamed on Dec 08, 2017, 12:23 PMIf Dont Work Tell Me i WIll try to Help You :P
Caption it

Discord: zeus#5155

umar4911

Quote from: ! on Dec 08, 2017, 10:58 AMYou need to see this

http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Timer.Delete

Method#1
Delete the timer while applying unmute command
For Method#2
Post your function which is used in timer when player's muted.


Fixed by editing function
Solved.

!

if ( Stats[ player.ID ].Mute == false ) return;
:D

Discord: zeus#5155

umar4911

Quote from: ! on Dec 09, 2017, 05:30 PMif ( Stats[ player.ID ].Mute == false ) return;
:D
I did this in my function xD

=RK=MarineForce

i think its not working for me

else if ( cmd == "umute" )
{
if ( pstats[ player.ID ].Level < 5 ) MessagePlayer( "[#FF0000][INFO][#ffffff] You Are Not Authorized To use This Command", player );
else if ( !text ) MessagePlayer("[#ff0000][INFO][#ffffff] /umute <Player>",player);
else {
local plr = FindPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
else if ( pstats[ player.ID ].Level < 5 ) MessagePlayer( "[#FF0000][INFO][#ffffff] You Are Not Authorized To use This Command", player );
else
{
Message( "[#fff123]Administrator[#ffffff] " + player.Name + " Unmuted " + plr.Name + "" );
IsMuted[ plr.ID ] = false;
}
}
return 0;
}
else if ( cmd == "mute" )
{
if ( pstats[ player.ID ].Level < 5 ) MessagePlayer( "[#FF0000][INFO][#ffffff] You Are Not Authorized To use This Command", player );
else if ( !text ) MessagePlayer("[#ff0000][INFO][#ffffff] /mute <Player>",player);
else {
local plr = FindPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
else if( pstats[ player.ID ].Level < pstats[ plr.ID ].Level ) MessagePlayer("[#ff0000][ERROR][#ffffff] You Cannot Give Any Admin Higher Level Than You", player);
else
{
local reason = GetTok( text, " ", 2 );
if ( !reason ) reason = "None";
Message( "[#fff123]Administrator[#ffffff] " + player.Name + " Muted " + plr.Name + " Reason: " + reason + "" );
IsMuted[ plr.ID ] = true;
}
}
return 0;
}

Mohamed Boubekri

@=RK=MarineForce If You Want it To Work
You Need To Download That's System
http://forum.vc-mp.org/?topic=1717.0Then The /mute And /umute Will Work.
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

=RK=MarineForce

ITS Nice Working .

Thankx ask kakan

solved