i’m trying to make a lua-script for selfkilling in battle. My objective is to find a way to make sure that people can’t sk in battle within 5 secs when being shot. I triend to make the lua script work, but i still a beginner in it. This is what i have:
function et_ClientCommand(client, command)
et.gentity_get(hitclient)
et.gentity_get(time)
if hitClient == qtrue then
if time <= 5000 then
if string.lower(command) == “kill” then
et.trap_SendServerCommand( client, "cp "^1Sorry, no selfkill in battle.
“” )
return 1
else
return 0
end
end
end
end
I have gotten al the commands from the sourcecode and i though they would work, but they don’t:(. Can someone help me get this right?