Hook for task ID
Hello everyone.
I would like to make this task for ID (just remove this hook task) because there is remove_task(id) which removes all the id tasks I have. Code:
code censored |
Re: Hook for task ID
Please indent your code, and use php tags.
|
Re: Hook for task ID
PHP Code:
(https://forums.alliedmods.net/showthread.php?t=125638) I hope it's more clear now. |
Re: Hook for task ID
Quote:
|
Re: Hook for task ID
PHP Code:
|
Re: Hook for task ID
You can make unique tasks by doing what is in the thread to which you linked (see post #8).
|
Re: Hook for task ID
Here you are an example of how your code should look like:
Code:
You need to do this to make all your code more readable. |
Re: Hook for task ID
1. Don't use stocks as ColorChat, etc... we have client_print_color().
2. Use constants: Code:
Code:
Code:
So: Code:
Code:
5. Consider to use get_players_ex() instead of get_players(). 6. If you're using that code in other plugin (jb mod for example) so you can remove it just like that: Code:
Moreover, you need to add: Code:
Code:
|
Re: Hook for task ID
Quote:
2.The "old" modules are perfectly fine. You don't gain anything by replacing them with reapi. It's fakemeta syndrome all over again. Try to understand how things actually work and then you will see that your claim is silly. 3.You don't gain anything, but you actually lose generality by creating unneeded dependencies. If you code only for yourself, yeah, do whatever you want. If you plan to release plugins here, then you should use default amxx modules where it's possible, so the code works in both default hlds and RE* stuff. I can understand using reapi and releasing here if you need to hook non virtual functions for example. But if you are replacing set_pev with whatever reapi's equivalent is or ham hooks with reapi hooks, then that's just dumb beyond belief. |
Re: Hook for task ID
Quote:
However, there are few things that cannot be done with ReAPI so in some cases that modules are useful, but in other cases, you can do almost everything with ReAPI. IMHO. That's only my recommendation. |
| All times are GMT -4. The time now is 07:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.