Delete trigger
I want to know if I can delete the triggers.
If yes, how? |
Re: Delete trigger
You can block a trigger's hook from executing. But it really depends on what you're trying to do.
Can you elaborate? |
Re: Delete trigger
Trivial example:
Command "say /zones" will create some triggers and command "say /removezones" will delete these triggers. But I want to create a plugin wherewith I can detected where is some player. (If some player type in chat "/where" the triggers will be created, will be show some message in chat with player's position and I want after to delete triggers because the map will be full with triggers and the server will be lagged.) |
Re: Delete trigger
I would say it is very dangerous to make a trigger volitile like that. Might i suggest using a toggle of some sort; turning off the trigger when you want it "disabled." The triggers that are created within the source are going to be there, weather enabled or not. Also: once the map changes all triggers will be deleted because AMXX isn't persistent, unless done through a file. If you're that worried about lag from users creating so many triggers...i'd suggest only allowing a single user to create so many (1 or 2) that way you'd have a max of 64.
But then again.....i'm just spurting crap. I don't know exactly what you'er trying to do. Code might help me. |
Re: Delete trigger
Here I created two small zones for tests..
PHP Code:
|
Re: Delete trigger
Code:
public DeleteWhereZones()There are way more elegant ways to write this. You should think about re-doing it. Most noteably....you can compress a lot of your many functions into one. And remove plugin_prechace; putting that functionality into plugin_init. I'm gonna be honest....that code confused the hell out of me. |
Re: Delete trigger
It should be
PHP Code:
|
Re: Delete trigger
Quote:
Might i also suggest dabbeling in hamsandwich. It offers a LOT of functionality for entities. |
Re: Delete trigger
In scripting I'm noob and I don't know lot ways to write a script.
Thanks for all, and Liverwiz, only if you want, you can tell me what you don't like in my script excluding plugin_precache and what would you do in my place? And again thanks. |
Re: Delete trigger
PHP Code:
|
| All times are GMT -4. The time now is 07:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.