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(client, SDKHook_TraceAttack, HookTraceAttack);
}
public Action:HookTraceAttack(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotype, hitbox, HitGroup)
{
decl String:weapon[100];
if (!attacker || attacker > MaxClients)
return Plugin_Continue;
GetClientWeapon(attacker, weapon, 100);
if(strcmp(weapon, "weapon_pistol") == 0)
{
IgniteEntity(victim,10.0);
PrintToChatAll("\x04 %s!",weapon);
}
return Plugin_Continue;
}