Jump to content

طلب


Recommended Posts

Flood , Var , aTimer = { } , { } , { }

addEventHandler ( 'onPlayerChat' , root , 
function ( )
	if ( not isPlayerMuted ( source ) ) then 
		if ( Var [ source ] == 3 ) then 
			if ( not isTimer ( aTimer [ source ] ) ) then 
				aTimer [ source ] = setTimer ( function ( source )
						Var [ source ] , aTimer [ source ] , Flood [ source ] = 0 , nil , nil
						setPlayerMuted ( source , false )
						outputChatBox ( "* Hi , You Can Talk " , source )
				end , 5000 , 1 , source )
			end
			if ( Flood [ source ] == 2 ) then 
				outputChatBox ( " * Muted " , source )
				setPlayerMuted ( source , true )
				cancelEvent ( )
			else 
				outputChatBox ( " * You Can't Say In Chat Now " , source )
				Flood [ source ] = ( Flood [ source ] or 0 ) + 1
				cancelEvent ( )
			end 
		else
			Var [ source ] = ( Var [ source ] or 0 ) + 1
		end
	end
end )

 

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...