Deathrun: CTSafe buttons (prevent CTs from activating traps)
7 Attachment(s)
https://raw.githubusercontent.com/Oc...er/version.png Deathrun: CTSafe buttons (prevent CTs from activating traps) ☄ Description
☄ Translations
https://raw.githubusercontent.com/Oc...using_this.png https://raw.githubusercontent.com/Oc...plugin_lab.png https://raw.githubusercontent.com/Oc...ad_default.png |
Re: Deathrun: CTSafe buttons (prevent CTs from activating traps)
Wow
|
Re: Deathrun: CTSafe buttons (prevent CTs from activating traps)
I can give you some suggestions:
1. Use button id instead of model 2. Save buttons to one file You can look into this post: https://forums.alliedmods.net/showth...16#post2433716 It works with button id , why you use model? Look: PHP Code:
PHP Code:
|
Re: Deathrun: CTSafe buttons (prevent CTs from activating traps)
I used xPaw's method in this plugin. It saves it by model. Is there actually a difference? If it's better, I'll remake it with id.
I prefer saving them in different files because it's much easier to transfer files from one server to another instead of adding lines in a single file. I'm talking about when you need to make a small change to a button on a map, not transfering all of them at once. |
Re: Deathrun: CTSafe buttons (prevent CTs from activating traps)
IMO using the model works better, xPaw knows his stuff. It's better to use different files because you can customize them for each map and it's easier to find the map file, rather than searching a big file for the correct line. Also, way more readable and organized.
|
Re: Deathrun: CTSafe buttons (prevent CTs from activating traps)
Using entity id is totally unreliable, because if another entity is spawned it could break the code(since index will be changed). Also using multiple files is more organized, so don't change.
PHP Code:
PHP Code:
PHP Code:
Since pev_mins and pev_maxs give you float values use EngFunc_WriteCoord instead of converting float to int. |
Re: Deathrun: CTSafe buttons (prevent CTs from activating traps)
Thanks for the advices. I'm keeping it this way then.
Everything else is fixed and code is updated. |
Re: Deathrun: CTSafe buttons (prevent CTs from activating traps)
Also check if iFilePointer is non 0 in case 1.
I don't like that all configurations are hardcoded, but they don't look like things that one would like to change, so I guess it's fine. |
Re: Deathrun: CTSafe buttons (prevent CTs from activating traps)
Done.
I made the configurations that way because I don't think it's necessary stuff like that to be changed. It would be rather dumb to make cvars for them. Like you said - I don't think someone would like to change them. Hope it's not a problem. |
Re: Deathrun: CTSafe buttons (prevent CTs from activating traps)
Remove iCount var from fileRead, it does nothing.
Again, wrong use of ML system. To print in player language, use player id instead of LANG_PLAYER. |
All times are GMT -4. The time now is 04:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.