Ulysses
General => Developers Corner => Topic started by: rejax on May 26, 2013, 04:01:37 AM
-
function GetPlayerName(ply)
return trace.Entity:Nick()
end
GetPlayerName(ply)
local pname = GetPlayerName(ply)
--spawntrain stuff
timer.Create( "bantrain", .3, 1, function( target_plys )
if pl:Alive() then RunConsoleCommand( "ulx ban", pname, 0 )
end )
end
Hi so I'm not too great at lua and I'm trying to make a command which spawns a train which permabans them on impact. However, I just can't get the ban bit right. I want to use ulx ban so that it can be reversed easily if need be. Basically this code just kills them, (I'm working on bots and myself) and it also tosses out an error whenever i save it.
[ERROR] addons/ulx/lua/ulx/modules/sh/fun.lua:97: unexpected symbol near ')'
1. unknown - addons/ulx/lua/ulx/modules/sh/fun.lua:0
Any pointers would be top! ;D
-
What is line 97 in your fun.lua file?
-
if pl:Alive() then RunConsoleCommand( "ulx ban", pname, 0 )
-
if pl:Alive() then RunConsoleCommand( "ulx ban", pname, 0 ) end
you forgot an 'end'