Talk:Gamemode Hooks

From GMod Wiki

Jump to: navigation, search
This looks amazingly sexier. I'll look into converting the function dumps into something like this. Tychon 16:30, 4 December 2006 (GMT Standard Time)
Actually, scratch that. The dumps should stay dumps -- I'll look into something better overall for actual reading purposes. Maybe something like a libraries page and an objects page, with each containing lists of their respective types that lead to more defined lists of functions under each. I'll whip something up and we'll see how it works out. Tychon 16:34, 4 December 2006 (GMT Standard Time)

Contents

Sandbox

I don't know whether to add the new Sandbox toolmenu hooks, should I just add them to the menu? They are sandbox specific. Jake 18:06, 5 September 2007 (GMT+1)

Fretta

Sandbox hooks in the Base Hooks' section

How can Sandbox Hooks:

Work outside of the Sandbox gamemode? They state that they open/close the spawn/context menu, which the Base does not have. --Unrealomega 21:11, 8 July 2009 (UTC)

They do work, actually. OnSpawnMenuOpen gets called upon pressing Q and OnSpawnMenuClose gets called upon releasing it. I've tested it in a fretta gamemode, which is not derived from sandbox. (I'm not so sure about the context menu, have yet to try it) --Dlaor 11:41, 9 July 2009 (UTC)
Seems you're right, as the code even says so. Congrats on this discovery. --Unrealomega 11:49, 9 July 2009 (UTC)

It's a Mess!

You may notice I put the tag up stating that the page needs to be fixed. The reason being, nearly every page is wrong. Some pages are listed under Serverside, but then on the page itself, is said to be used shared. This is not the only problem. So many pages have incorrect formatting of the arguments. Some have brackets around the images, some don't have any at all. We are trying to set out a standard throughout the wiki so that each page has a similar format. A format that is easy to read, and understand from. We don't want brackets around images, and we don't exactly want ply or pl, try to use a full word like player. It gives the reader more information and keeps it the same throughout the wiki. I would also like to point out that many of the examples arn't very good at describing what each hook does. An example should really show how to use all the returned variables when the hook is called. No matter how random it is. And also the description should be kept clear, along with the output. But don't make a huge fancy example using every function you can find or advanced mathematics, just printing (example) the players name, and the attackers name in console with the Damage hook would do. Look at Gamemode.PlayerSpawn for a good example.

I have gone through the Server side already to fix only some of the formatting problems.

--Jamie Sharpe 19:12, 18 September 2009 (UTC)

Rather than using an old template with explanation, I put the explanation in the template itself. -- Dlaor 19:36, 18 September 2009 (UTC)
I agree using player helps understand what it refers too, but many persons will just copy and paste it and expect it to work perfectly..

--Crazy Quebecer 20:37, 18 September 2009 (UTC)

Don't use italics with the parameters. :P Been removing them before this and now if we reinstate them, it'd take more time to add them back. XD But anyway, yes, I agree. --Unrealomega 21:27, 18 September 2009 (UTC)
I've moved a few functions from Serverside to Shared that were listed as being such, specifically Gamemode.CompletedIncomingStream, Gamemode.DoPlayerDeath (not sure if this is shared,) and Gamemode.OnPlayerHitGround.

--Nerdboy 17:44, 24 December 2009 (UTC)

Move Shared?

Should Shared be moved to the center of the columns? so the table will be like this:

ServersideSharedClientside

Makes more sense to me, because shared can be used by both client and server. --CowThing 22:12, 29 April 2010 (UTC)

I don't know.. It's sort of a standard to have shared at the end all around the wiki. Maybe it should be in alphabetical order (cl,sv,sh)? --Crazy Quebecer 22:25, 29 April 2010 (UTC)
The Global_Functions page has (Client, Shared, Server). I'll make the change, and if people don't like it we can change it back. --CowThing 02:25, 30 April 2010 (UTC)
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox