• Need help making this into a command.
    5 replies, posted
How would I go about making this into a command? [CODE]local ply = LocalPlayer() chat.AddText( Color( 255, 0, 0 ), "Alright ", ply, " Go throw up you first tag behind me... " )[/CODE]
use the concommand library.
[QUOTE=Exploderguy;46441497]use the concommand library.[/QUOTE] Well, I know that. I just don't know what to put in it.
It will print this if you write hey in console [CODE] if CLIENT then concommand.Add("hey", function() local ply = LocalPlayer() chat.AddText( Color( 255, 0, 0 ), "Alright ", ply, " Go throw up you first tag behind me... " ) end) end[/CODE] Put that in lua/autorun/
ply is the Player, will return an error. use ply:GetName() to get the player name (obviously)
[QUOTE=Xaotic;46446089]ply is the Player, will return an error. use ply:GetName() to get the player name (obviously)[/QUOTE] Actually, IIRC, Player objects in the chat.AddText function will automatically spit out their name.
Sorry, you need to Log In to post a reply to this thread.