hai everyone, im trying to make a slay command for my new gmod server but its not working ^^
heres the code
add.ConsoleCommand(slay, function( player, command, arg )
for k v in ipairs( players.getall )
if Name = arg then
Kill()
end
thanks
hai everyone, im trying to make a slay command for my new gmod server but its not working ^^
heres the code
add.ConsoleCommand(slay, function( player, command, arg )
for k v in ipairs( players.getall )
if Name = arg then
Kill()
end
thanks
Well, let’s go over a few things first.
I think you should try and learn some basic Lua before trying to make anything.
[lua]
concommand.Add(“slay”, function( p, c, a )
for _, v in ipairs( player.GetAll() ) do
if string.find( string.lower( v:Nick() ), string.lower( a[1] ) ) then
v:Kill()
end
end
end )
[/lua]