View Single Post
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 03-15-2016 , 16:36   Re: Removing C4 on C4 map CS:S
Reply With Quote #6

I'm not current on the changes, but something like this would work to remove the C4

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
public CS_RemoveBomb(client)
{
    new 
weapon_index = -1;
    
    for (new 
slot 0slot 6slot++)
    {
        while ((
weapon_index GetPlayerWeaponSlot(clientslot)) != -1)
        {
            if (
IsValidEntity(weapon_index))
            {
                if (
slot == CS_SLOT_C4)
                {
                    
RemovePlayerItem(clientweapon_index);
                    
AcceptEntityInput(weapon_index"kill");
                }
            }
        }
    }

__________________
View my Plugins | Donate
TnTSCS is offline