Jump to content

مشكله في كود


+Source|>

Recommended Posts

مب راضي يشتغل

ابي لما احدد لاعب من الجريد ليست

واضغط زر يسويله ميوت

 

--server

addEvent("muted", true)
addEventHandler("muted", root,
	function( nn )
	if nn then
	local victim = getPlayerFromName( nn )
	if victim then
		if ( not isPlayerMuted( victim ) ) then
			setPlayerMuted( victim, true )
			outputChatBox( "You Have Been Muted .", victim, 255, 0, 0, true )
		end
	end
	end
	end
)

--client

addEventHandler("onClientGUIClick", root,
	function()
	local ss = guiGridListGetSelectedItem( spgrid )
	local tt = guiGridListGetItemText( spgrid, ss, 1 )
	local nn = guiGridListGetItemText( spgrid, guiGridListGetSelectedItem( spgrid ), 1 )
		if source == spmute then
			if ( ss ~= -1 ) then
				triggerServerEvent( "muted", localPlayer, nn )
			else
				outputChatBox( "Please Select Player !", 255, 0, 0, true )
			end
		end
	end
)

 

Link to comment
    --server

    addEvent("muted", true)
    addEventHandler("muted", root,
    	function( tt )
    	local victim = getPlayerFromName( tt )
    	if victim then
    		if ( not isPlayerMuted( victim ) ) then
    			setPlayerMuted( victim, true )
    			outputChatBox( "You Have Been Muted  By ."..getPlayerName(source).."", victim, 255, 0, 0, true )
    		end
    	end
    	end
    	)
    
    --client
    addEventHandler("onClientGUIClick", root,
    	function()
		if source == spmute then
    	local ss = guiGridListGetSelectedItem( spgrid )
    	local tt = guiGridListGetItemText( spgrid, ss, 1 )
    			if ( ss ~= -1 ) then
    				triggerServerEvent("muted",localPlayer,tt)
    			else
    				outputChatBox( "Please Select Player !", 255, 0, 0, true )
    			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...