Thread: HomeFree v0.7
View Single Post
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-30-2011 , 14:05   Re: HomeFree
Reply With Quote #23

- You don't understand the caching thing.
That : get_user_msgid("SayText"), it returns an unique number which won't change in-game. Since static, and since it will be called more than one time, it would be appropriate to cache its value into a global variable one time, in plugin_init for example.
- Same for get_maxplayers(). You save the value before, it's better, but it will still be called each time the function will be run, and the returns value won't change in-game.
- Why are you using register_message for TxtMsg ? There is not reason to hook the message as pre, you don't want to modify its params, right ? You can simply use 2 register_event. It will be more efficient.
- What are you trying to delete the entity in the player's spawn ? How you can expect you find such entity when Ham_Spawn is registered with "player" ? Really doesn't make sense what you do. Search you will find snippet for that.

It does not really matter you have worked hard. Look, each time there are many things to say, it proves simply you need to learn more. Nothing wrong with that, you should just aware of your own limit. That's not the scripting section. You are supposed to know what you're doing. That's why I've said I was wondering if you can support really your plugin. You have some potential for sure, but you will understand it starts to be boring to correct you each time because our job is not to teach you how to code.

Anyway for now, it seems you can follow, fix your plugin, and really please, test your plugin before releasing.
__________________

Last edited by Arkshine; 09-30-2011 at 14:12.
Arkshine is offline