Hey there!
I want to modify the classic Advert script from NoSimplerr.
If I write in the Chat /act bla it should be in the chat:: /act *bla*
Code:
-----------------------------------------------------------------------------
sv_advert.lua
#NoSimplerr#
function playerAdvert( ply, args )
if args == "" then
ply:SendLua( string.format( [[notification.AddLegacy( "%s", 1, 5 )
surface.PlaySound( "buttons/button15.wav" )]], CLASSICADVERT.failMessage ) )
else
for k,pl in pairs( player.GetAll() ) do
local senderColor = team.GetColor( ply:Team() )
DarkRP.talkToPerson( pl, senderColor, CLASSICADVERT.chatPrefix.." "..ply:Nick(), CLASSICADVERT.advertTextColor, args, ply )
end
return ""
end
end
DarkRP.defineChatCommand( CLASSICADVERT.chatCommand, playerAdvert )
-------------------------------------------------------------------------
sh_config.lua
--[[-------------------------------------------------------------------------
You are free to use, distribute and change this module, as long as you keep
this text here - and/or credit me:
Made by Fillipuster :D
---------------------------------------------------------------------------]]
CLASSICADVERT = CLASSICADVERT or {}
--[[-------------------------------------------------------------------------
CLASSIC ADVERT CONFIG
---------------------------------------------------------------------------]]
-- The prefix before the adverted text (but after the sending player's name).
CLASSICADVERT.chatPrefix = "[Act]"
-- The color of the text in the advert (Originally yellow).
CLASSICADVERT.advertTextColor = Color( 255, 255, 0, 255 )
-- The failure message id the players fails to provide text for the advert.
CLASSICADVERT.failMessage = "Du musst was eingeben!"
-- The chat command for adverts. (A "/" is added at the front automatically.)
CLASSICADVERT.chatCommand = "act" -- 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.
CLASSICADVERT.commandDescription = "Message all players on the server."
-- The delay (in seconds) between players being able to advert.
CLASSICADVERT.commandDelay = 3
--[[-------------------------------------------------------------------------
END OF CONFIG
---------------------------------------------------------------------------]]
DarkRP.declareChatCommand{
command = CLASSICADVERT.chatCommand,
description = CLASSICADVERT.commandDescription,
delay = CLASSICADVERT.commandDelay
}
what is your issue?
I dont know how to change the output?
(i want it to:
[ACT] the Name of the User : *Bla*
did u use this script for the normal advert, too? than u have to redefine the variables and the function to another name.. aang.
Sorry, you need to Log In to post a reply to this thread.