Admin /advert is not targeting admin

After we run this code its not targeting admins, everyone are allowed to use /aadvert. What are we doing wrong with the bit of code?
We want only admin to be allowed to use this admin advert and not user, but we cant figured it out.

sh_Config


CLASSICADVERTA = CLASSICADVERTA or {}

--[[-------------------------------------------------------------------------
					CLASSIC ADVERT CONFIG
---------------------------------------------------------------------------]]

-- The prefix before the adverted text (but after the sending player's name).
CLASSICADVERTA.chatPrefix = "[Admin Advert]"

-- The color of the text in the advert (Originally yellow).
CLASSICADVERTA.advertTextColor = Color( 255, 0, 0, 255 )

-- The failure message id the players fails to provide text for the advert.
CLASSICADVERTA.failMessage = "You need to provide text for your aadvert."

-- The chat command for adverts. (A "/" is added at the front automatically.)
CLASSICADVERTA.chatCommand = "aadvert" -- Please, do not use "/advert" as it is used for the new advert system in DarkRP.

-- The F1 (help menu) description of the advert command.
CLASSICADVERTA.commandDescription = "Message all players on the server."

-- The delay (in seconds) between players being able to advert.
CLASSICADVERTA.commandDelay = 3

--[[-------------------------------------------------------------------------
					END OF CONFIG
---------------------------------------------------------------------------]]

DarkRP.declareChatCommand{
    command = CLASSICADVERTA.chatCommand,
    description = CLASSICADVERTA.commandDescription,
    delay = CLASSICADVERTA.commandDelay
}


sv_aadvert.lua


function playerAdvertA( ply, args )

	if args == "" then

		ply:SendLua( string.format( [[notification.AddLegacy( "%s", 1, 5 )
			surface.PlaySound( "buttons/button15.wav" )]], CLASSICADVERTA.failMessage ) )
	if not ply:IsAdmin() then DarkRP.notify(ply, 1, 4, "You have to be admin!") return "" end
	else

		for k,pl in pairs( player.GetAll() ) do

			local senderColor = team.GetColor( ply:Team() )
			DarkRP.talkToPerson( pl, senderColor, CLASSICADVERTA.chatPrefix.." "..ply:Nick(), CLASSICADVERTA.advertTextColor, args, ply )

		end

		return ""

	end

end
DarkRP.defineChatCommand( CLASSICADVERTA.chatCommand, playerAdvertA )

Move

so it’s under else (1 line down).

Also remove the quotes from all return’s as you’re returning nil and not a string on neither of them.

Thanks for the help, it works perfectly now ! :smiley: