[QUOTE=sannys;50859791]PlayerSay is no different than any other hook. Different addons will use it for different things. Literally just today I had to work with a customer for an hour or so because it turns out [URL="https://github.com/AC2github/LC-FC-Deathrun/pull/1/files"]his gamemode was doing this exact thing[/URL] and was breaking our admin addon's chat commands.[/QUOTE]
I still don't know why it's based on hook type and not hook name, since returning all paths is generally considered a proper programming practice to keep a program from behaving unexpectedly, in C++ it will even warn you if you don't return all paths. Maybe I'm just dumb, and that's probably the case.
[QUOTE=sannys;50859791]PlayerSay is no different than any other hook. Different addons will use it for different things. Literally just today I had to work with a customer for an hour or so because it turns out [URL="https://github.com/AC2github/LC-FC-Deathrun/pull/1/files"]his gamemode was doing this exact thing[/URL] and was breaking our admin addon's chat commands.[/QUOTE]
Returning in this hook won't 'fuck up the hook' if you're doing it correctly, meaning you should be returning an empty string [i]only when the chat command matches[/i]. Otherwise you shouldn't return anything so that all of the other addon hooks (and lastly the gamemode hook) can be evaluated as well. If you provide a condition where you [i]always[/i] return in this hook then yeah, you'll break everything because you don't understand the hook system fully I guess.
So yes, different addons will use it for different things, but you are only returning to stop further evaluation of the hook when the player says something that matches exactly what you want. If you wrote your script properly you won't be overriding any functions from other mods (unless that's your intention) so returning will not hurt anything.
[QUOTE=ItsArmiii;50859328]Guys Please Stop With The Mean Comment's. Its Just A Start![/QUOTE]
We're mean because you released something broken, what if someone tried to use this on their server? Just remember the experience, and test your script more before release next time.
[QUOTE=Banana Lord.;50859983]Returning in this hook won't 'fuck up the hook' if you're doing it correctly, meaning you should be returning an empty string [i]only when the chat command matches[/i]. Otherwise you shouldn't return anything so that all of the other addon hooks (and lastly the gamemode hook) can be evaluated as well. If you provide a condition where you [i]always[/i] return in this hook then yeah, you'll break everything because you don't understand the hook system fully I guess.[/QUOTE]
Yes. That is what I said. I never said returning in a hook will fuck up the hook. He said the OP should be returning [B]on all paths[/B]. I said no, you should not be returning on all paths. If you are returning on all paths, you're not doing it correctly. You are agreeing with me.
[QUOTE=-Rebound-;50847497]Oh sorry for using big boy words it appears to me that theres virgin ears here still?[/QUOTE]
It's not that your use of 'big boy words' are harming the targeted individual.
The matter is simply that you're response to the already negative situation is not resolving but in fact initiating further conflict with the individuals.
[QUOTE=-Rebound-;50847497]*No one wanted to hear negativity from your mouth shut up if you "know" this already[/QUOTE]
This is an outright hypocrisy.
This guy's first scripts are probably much better than my first two-hundred, so keep it up!
And to everyone else here, I am wondering if you realize, but above, you can see the entire facepunch community in a nutshell.
:nope:
[QUOTE=0V3RR1D3;50844786]Sell it on scriptfodder, you deserve the money.[/QUOTE]
AHAHAHAHA
Sorry, you need to Log In to post a reply to this thread.