AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to remove last entity (NPC) (https://forums.alliedmods.net/showthread.php?t=153241)

dFF 03-20-2011 14:58

How to remove last entity (NPC)
 
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 ...



wrecked_ 03-20-2011 16:44

Re: How to remove last entity (NPC)
 
Make a global variable and assign the NPC entity id to that variable when you create a new NPC.

Mini_Midget 03-22-2011 07:09

Re: How to remove last entity (NPC)
 
If only small has some sort of stack collection like java...


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

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