Hello,
I'm very new to lua, so pls dont hate me for asking so much in this forum.
Can u tell me how to fix this error?
https://files.facepunch.com/forum/upload/305674/2756e849-32c9-4285-ad93-5a29cc38c6b1/Screenshot_18.png
Thats the code:
AddCSLuaFile("TestKeyPress.Lua")
function GM:KeyPress(ply, key)
if (key == IN_USE) then
ply:Kill()
end
end
GM = Gamemode. Use hooks.
i feel like you told him that over 10 times now..
You need a hook for GM function. Try this.
hook.Add( "KeyPress", "keypress_hook", function( ply, key )
if ( key == IN_USE ) then
ply:kill()
end
end )
--- Somthing like that, for more info click this link. GM/KeyPress
Sorry, you need to Log In to post a reply to this thread.