[Help] Command to nickname

I have this code:


for k,v in pairs(player.GetAll()) do if v:Nick()=="namehere" then
 

net.Start( "hello" )
net.WriteEntity(v) -- v?
net.WriteEntity(hello)
net.SendToServer()
end
end

how can i make that a concommand will be like: “hello Name”
so when i do hello Name
it will send net.start hello
to the name i wrote

its not helping me

How so? Or do you expect me to write everything for you?

can you atleast make the script i wrote in my post work with this?


concommand.Add("makehello", function(ply,cmd,args)
	if args[1] == nil then
		chat.AddText(Color(255,255,255), "hello: Arguments not valid.")
	else
	target = nil
	for k,v in pairs (player.GetAll()) do
		if  string["find"]( v:Nick():lower(), args[1]:lower() ) then
			target = v
		end
	end
	if target != nil and target != LocalPlayer() then
		net.Start("hello")
		net.WriteString(broken())
		net.SendToServer()
		chat.AddText(Color(255,255,255), "hello: " .. target:Nick() .. " has been banned")
	else
		chat.AddText(Color(255,255,255), "hello: Player not found!")
	end
end
end)

bump bump

We don’t code stuff for you, we give ways for you to code it, like help, links and advices, but no coding.

It’s hard to see the magic in that example. Actually knowing what key words to search for will make life as a programmer easier for you.

Google: Lua concatenation

Perhaps a youtube tutorial or am I misunderstanding what you want?