Remove any entities at startup
1 Attachment(s)
Add the cvars below to the configs/amxx.cfg:
ent_remove_class <classname> ent_remove_model <model> (this has to be full path) Or, you can put this in configs/maps/*MAPNAME*.cfg for individual maps! This will remove anything you want on startup. |
Change this:
Code:
Code:
|
What's the point of that? It's the same thing, and I tested it. Unless of course you meant to set entity_count() when the map loads, and dont get it again over and over?
|
Quote:
|
I'm not using a string :) But I'll do this anyways.
Edit: Done |
Your plugin wouldn't work all the time as intended because of possible "holes" between entities, i.e. empity entity slots.
You have to use get_global_int(GL_maxEntities) if you want complete plugin in similar way. Also you can done that plugin with fakemeta module Code:
|
notice the is_valid_ent() :p
|
No, you didn't get it.
Lets say: maxents == 5 entcount == 4 Entlist: 1, 2, 3, 5 4 is empty slot. Now if you would use loop, you'll get: From 1 to 4, i.e 1, 2, 3, 4. Yes, your script would pass 1, 2, 3 and detect that 4 is invalid BUT script wouldn't detect 5. Why? Yes, because of that "hole". And look what if maxents instead of entcount is used? Yes, no such problem. |
You won't be able to remove hostage_entity with that it'll cause the server to crash.
|
There are plugins similar to, and more powerful than, this one.
|
All times are GMT -4. The time now is 13:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.