Intro:
Hello, I'm new here :>
Recently I started working on plugin for TF2 that logs events. I am completely new to sourcemod. Could use some help.
Context:
There is an event in TF2 called "player_chargedeployed".
It launches as it states when uber charge is deployed. It provides us with two values userid and targetid.
Question:
I would like to know if one could get type of uber used based on that information. Stock, kritz, quick-fix, vax.
My attempt:
PHP Code:
public Action Event_ChargeDeployed(Event event, const char[] name, bool dontBroadcast)
{
char userid[64];
userid = getSteam64(event.GetInt("userid"));
int clientIndex = GetClientOfUserId(event.GetInt("userid"));
char typeOfUber[32];
GetClientWeapon(clientIndex, typeOfUber, sizeof(typeOfUber));
char targetid[64];
targetid = getSteam64(event.GetInt("targetid"));
PrintToChatAll("player_chargedeployed,userid:%s,targetid:%s,typeofuber:%s", userid, targetid, typeOfUber);
}
My output: tf_weapon_medigun
Expected output: name of specific medicgun for exampl tf_weapon_vaccinator
Outro:
If I broke any of your forum standards plz let me know, happy to improve!