amx_blockdamage
3 Attachment(s)
Description:
Enables / disables damage done by a player. Commands: - amx_blockdamage <name/steamid/userid> <0/1> "Block / Unblock damage done by a player." - amx_blockdamage_list "List all the currently connected no-damage players" Credits: - Pan1c: Came up with the idea as a request here: http://forums.alliedmods.net/showthread.php?t=149978 Changelog: v1.0.0: Created plugin v1.0.1: Removed Trie v1.0.2: Optimized code |
Re: amx_blockdamage
Cool plugin,I use it on my server for the evil player :)
|
Re: amx_blockdamage
I don't see the point on using both a trie and nvault, trie would be usefull if you would store steamids in a file to load all steamids at map start.
In fact, you never retrieve data from the trie : Code:
Line 37: new Trie: g_tBlockedIds; |
Re: amx_blockdamage
I worked with a seperate file first, and then changed it to nvault.
Guess i forgot to remove the trie. EDIT: Removed trie |
Re: amx_blockdamage
Maybe:
PHP Code:
PHP Code:
|
Re: amx_blockdamage
I don't think that will really matter, i have to make the if and else anyways.
And i like my way more. It's easier to see the value i just set |
Re: amx_blockdamage
Its extra code for nothing. :)
|
Re: amx_blockdamage
Imo it's more readable then yours.
If an approver tells me to change it due performance or something, i will. If not, i'd like to keep it like it is. EDIT: Wrecked told me that yours is less efficient because it has to retrieve the current value first, and then change it to the opposite. |
Re: amx_blockdamage
Code:
Also, you can lower names and authids arrays to 32 cells |
Re: amx_blockdamage
Done
|
All times are GMT -4. The time now is 16:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.