Remove map specific ent
I am trying to remove one entity in particular in on particular map...
whats my problem ? Code:
I am trying to remove a specific model on a specific map. In this case model # 105 on map de_aztec2. The only problem is that its labeled as a wall...i want to remove just this one...not all the walls. LOL :) help would be +karma'd |
Re: Remove map specific ent
Your problem is the string comparisons..
Strings cannot be compared using = because the are essentially an array of cells. for the first error just remove the curmap[] = from that start and I think it should work fine. Code:
And for the comparison use the equali function Code:
|
Re: Remove map specific ent
Is there actually a REMOVE event ? I'm no expert, but I've never heard of it.
Also, for efficiency, make the plugin dependent on the desired map... Place in the 'event_remove' routine or before registering the event Code:
|
Re: Remove map specific ent
Lol yeah didn't notice that...
Pretty sure that event doesn't exist. Just run the function in plugin_cfg on something similar that happens only on map start. And yes check the map as early as possible, no point in searching for ents when you're not going to do anything with them |
Re: Remove map specific ent
Please note: some ents can only be deleted on plugin_precache() [check other plugins for more info].
|
| All times are GMT -4. The time now is 06:43. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.