• How can I go about doing a Target:Function()
    2 replies, posted
If the title doesn't make sense I'm basically asking how I can throw together a function like player:Health() Still fairly new to lua so sorry f this is extremely simple
You can see how Garry's Mod does it with the 'IsAdmin' function here; [URL]https://github.com/garrynewman/garrysmod/blob/784cd57576d85712fa13a7cea3a9523b4df966b0/garrysmod/lua/includes/extensions/player_auth.lua#L2-L14[/URL] A lot of functions, like 'Health' are from the game engine, and so are written in C++ as opposed to Lua
[QUOTE=smithy285;51693538]You can see how Garry's Mod does it with the 'IsAdmin' function here; [URL]https://github.com/garrynewman/garrysmod/blob/784cd57576d85712fa13a7cea3a9523b4df966b0/garrysmod/lua/includes/extensions/player_auth.lua#L2-L14[/URL] A lot of functions, like 'Health' are from the game engine, and so are written in C++ as opposed to Lua[/QUOTE] Thanks a bunch, I knew that functions like health and sethealth were from the engine so I wasn't entirely sure if it was possible through lua. I was scanning Garry's github and it didn't even cross my mind to look through the user group functions! Thank you
Sorry, you need to Log In to post a reply to this thread.