• Code help
    7 replies, posted
this is my code im trying to make a thirdperson script for my server hook.Add( "thirdp", "kek", function() if (ply:KeyPressed( IN_ZOOM ) ) then ply:concommand("simple_thirdperson_enable_toggle") end end ) i cant find out whats wrong with it and i want to find out how to make the key f4
Firstly, thirdp isn't a hook that even exists by default. Secondly, concommand isn't lowercase
The "thirdp" hook is most likely not called Try this [lua] hook.Add( "KeyPress", "kek", function( ply, key ) if ( key == IN_ZOOM ) then ply:ConCommand( "simple_thirdperson_enable_toggle" ) end end ) [/lua] And you might wanna check this out [b][url=https://wiki.garrysmod.com/page/Hook_Library_Usage]Hook Library Usage [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
didnt work probably cause of the kek part
Does this command exists? [I]simple_thirdperson_enable_toggle[/I]
[QUOTE=gonzalolog;51209060]Does this command exists? [I]simple_thirdperson_enable_toggle[/I][/QUOTE] Yes if he has the Simple Third person add-on from the workshop. This command is pretty useless as Simple Third person has a bind already unless you are changing that bind.
That's the most deceptive title I've ever seen
You cant just make a thirdperson script by just typing the words "thirdperson" everywhere and expect the game to kiss your ass EDIT: It doesn't even make it better that you are spelling functions wrong, and you haven't set "ply"
Sorry, you need to Log In to post a reply to this thread.