lol necavi, you failed to swap them.
here you go:
PHP Code:
#include <tf2>
#define IS_CLIENT(%1) (1 <= %1 <= MaxClients)
public Plugin:myinfo =
{
name = "TF2 Explosive Revolver Rounds",
author = "TheAvengers2",
description = "Revolver rounds ignite victims",
version = "1.0.0",
url = "http://sourcemod.com/"
}
public OnPluginStart() {
HookEvent("player_hurt", Event_PlayerHurt);
}
public Action:Event_PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid")), attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
decl String:attackerWeapon[20];
if (IS_CLIENT(client) && IS_CLIENT(attacker) && IsClientInGame(attacker))
{
GetClientWeapon(attacker, attackerWeapon, sizeof(attackerWeapon));
if (StrEqual(attackerWeapon, "tf_weapon_revolver"))
{
TF2_IgnitePlayer(client, attacker);
}
}
}
Hmm.. I thought the first parameter was who initiated the action, unfortunately, it's actually the victim of it.