Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This is a category name and must be set correctly to work
- local CATEGORY_NAME = "Dink, put the correct category here"
- --This function uses fancyLog to psay the player and CSay the message- see ulib docs for color parameters
- --the ulib csay will only send the csay to target_ply unless target ply is replaced with "_"
- function ulx.pcsay( calling_ply, target_ply, message )
- ulx.fancyLog( { target_ply, calling_ply }, "#P to #P: " .. message, calling_ply, target_ply )
- ULib.csay(target_ply, message)
- end
- --This is where the category name has to be correct, it's a string above, passed here
- local pcsay = ulx.command( CATEGORY_NAME, "ulx pcsay", ulx.pcsay, "!pc", false )
- --These params assist the text parser for chat
- pcsay:addParam{ type=ULib.cmds.PlayerArg, target="!^", ULib.cmds.ignoreCanTarget }
- pcsay:addParam{ type=ULib.cmds.StringArg, hint="message", ULib.cmds.takeRestOfLine }
- --Set appropriate permissions below
- pcsay:defaultAccess( ULib.ACCESS_ALL )
- pcsay:help( "Send a private csay to target." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement