local killedtimes = 0
function OnObjectCreate(o)
if Is_A_Star(o) then
Attach_Script_Once(o, "Killed_Speccript", "")
end
end
Killed_Speccript = {}
function Killed_Speccript:Killed(ID, obj, killer)
print("Killed | ID - %d", ID)
if killedtimes == 0 then
InputConsole("spectate %d", ID)
killedtimes = 1
else
killedtimes = 0
end
end
Register_Script("Killed_Speccript", "", Killed_Speccript)
Haven't done LUA in a long time but i think that should work
[Updated on: Thu, 07 July 2011 00:30]
Report message to a moderator