Raised This Month: $ Target: $400
 0% 

How to remove last entity (NPC)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 03-20-2011 , 14:58   How to remove last entity (NPC)
Reply With Quote #1

I create some NPCs and I want to remove previous NPC created, but I don't have idea how to do this.

PHP Code:
while( ( iEnt engfuncEngFunc_FindEntityByStringiEnt"classname""npc_bot" ) ) > )
{
    if( 
g_iLastEntCreateiEnt ] ) )
        
remove...

... 
no ideas ...

dFF is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 03-20-2011 , 16:44   Re: How to remove last entity (NPC)
Reply With Quote #2

Make a global variable and assign the NPC entity id to that variable when you create a new NPC.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 03-22-2011 , 07:09   Re: How to remove last entity (NPC)
Reply With Quote #3

If only small has some sort of stack collection like java...
__________________
It's a mystery.
Mini_Midget is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode