Raised This Month: $51 Target: $400
 12% 

[SOLVED] Deleting item spawns from map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Oliveboy
Member
Join Date: Feb 2010
Old 10-31-2010 , 19:36   [SOLVED] Deleting item spawns from map
Reply With Quote #1

Hi,

I'm making this 357 only plugin for HL2DM, but my problem is that i want to get rid of the item spawns that come on the map. Is there a way to do this without using STRIPPER?

Deleting weapon spawns on the map by using sourcemod scripting only, is that possible?

Greetz,
Oliveboy.

Last edited by Oliveboy; 11-01-2010 at 15:38. Reason: Solved
Oliveboy is offline
honorcode23
BANNED
Join Date: Mar 2010
Location: Chile
Old 11-01-2010 , 00:39   Re: Deleting item spawns from map
Reply With Quote #2

You could loop trough all entities on map start, something like:

PHP Code:
#include <sourcemod>
#include <sdktools>

public OnMapStart()
{
    for(new 
MaxClients+1GetMaxEntites(); i++)
    {
        if(
IsValidEntity(i) && IsValidEdict(i))
        {
            
decl String:class[256];
            
GetEdictClassname(i, class, sizeof(class));
            if(
StrEqual(class, "SPAWN ENTITY CLASSNAME HERE"))
            {
                
AcceptEntityInput(i"Kill");
            }
        }
    }

honorcode23 is offline
Oliveboy
Member
Join Date: Feb 2010
Old 11-01-2010 , 09:28   Re: Deleting item spawns from map
Reply With Quote #3

You are epic. That's all i have to say. It works like a charm!
Checkout the finished plugin here:

http://forums.alliedmods.net/showthread.php?t=141863
Oliveboy is offline
Reply



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 10:00.


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