View Single Post
Author Message
Austin
Senior Member
Join Date: Oct 2005
Old 04-29-2018 , 15:41   [L4D2] Default fire bullets for pistol
Reply With Quote #1

I have the following plugin I wrote for css/csgo to make the glock shoot fire bullets.
It works fine in css/csgo.

I would like to have this for L4D2 pistols.
I modified the weapon name to match the pistol in L4D2,
but it doesn't work.

What do I have to do so the l4d2 pistol "ignites" the common and special infected?
tx

PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>

public Plugin:myinfo =
{
    
name "ABSUtils",
    
author "Austinbots",
    
description "L4D2 Default Fire Bullets for Pistol",
    
version "1.0",
    
url ""
}

public 
OnPluginStart()
{
}

public 
OnClientPutInServer(client)
{
    
SDKHook(clientSDKHook_TraceAttackHookTraceAttack);
}

public 
Action:HookTraceAttack(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotypehitboxHitGroup)
{
    
decl String:weapon[100];

    if (!
attacker || attacker MaxClients)
        return 
Plugin_Continue;

    
GetClientWeapon(attackerweapon100);
    if(
strcmp(weapon"weapon_pistol") == 0)
    {
        
IgniteEntity(victim,10.0);
        
PrintToChatAll("\x04 %s!",weapon);
    }

    return 
Plugin_Continue;


Last edited by Austin; 04-29-2018 at 15:42.
Austin is offline