Request Deathmsg event to include
Hello i tried to deathmsg event.
no compile error.. my question is if last line about bool is for user used blocks. will hide the victim used blocks after get i terrorist team? PHP Code:
|
Re: Request Deathmsg event to include
You've written the code such that the code is only executed if the player is alive in an event that signifies that the player is dead. Therefore, no code will even be executed.
As for general advice, I'd say that unless you have a whole bunch of conditions that would cause you to return from a function before the main code executes, you should simply put the main code in the if statement with the conditional negated. I.e. instead of saying if the user is not connected then return do if the user is connected then execute the code. It makes the code easier to understand and can help prevent introducing bugs like this one. Also, I'm not really sure what your question is about. If you are asking about a specific line of code, you need to call that out somehow. Probably the simplest is to add another code block to your post with just the code you're referencing so that we can be sure we're looking for the correct spot in the larger code. |
All times are GMT -4. The time now is 19:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.