Raised This Month: $209 Target: $400
 52% 

slay scar20


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mrmiki
Junior Member
Join Date: Mar 2021
Old 04-17-2021 , 21:36   slay scar20
Reply With Quote #1

hello
i need a plugin if a player pick scar20 get slayed
is there any plugin like this?
thanks
mrmiki is offline
Cruze
Veteran Member
Join Date: May 2017
Old 04-30-2021 , 08:26   Re: slay scar20
Reply With Quote #2

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

public Plugin myinfo =
{
    
name "Slay on Auto-Sniper pickup",
    
author "Cruze",
    
description "",
    
version "1.0",
    
url ""
};

public 
void OnPluginStart()
{
    for(
int i 1<= MaxClientsi++)
    {
        if(
IsClientInGame(i))
        {
            
OnClientPutInServer(i);
        }
    }
}

public 
void OnClientPutInServer(int client)
{
    
SDKHook(clientSDKHook_WeaponCanUseEvent_WeaponCanUse);
}

public 
Action Event_WeaponCanUse(int clientint weapon)
{
    if(!
IsClientInGame(client))
        return 
Plugin_Continue;

    if(!
IsValidEdict(weapon))
    {
        return 
Plugin_Continue;
    }

    
char classname[64];
    
GetEdictClassname(weaponclassnamesizeof(classname));
    
    if(
classname[0] == '\0')
    {
        return 
Plugin_Continue;
    }
    
    if(
StrContains(classname"scar20"false) != -|| StrContains(classname"g3sg1"false) != -1)
    {
        
ForcePlayerSuicide(client); //Really stupid to slay instead of just blocking pickup.
        
return Plugin_Handled;
    }
    return 
Plugin_Continue;

__________________
Taking paid private requests! Add me on steam/discord!
AlliedModders Releases | Github | Private Plugins | PayPal | Steam | My Discord Server
Cruze 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 05:36.


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