Does anyone have any idea why I can't return this string value? This is something I wrote real quick just to make sure I could return string values, but when I compile it says tag mismatch on line 43.
Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdktools_trace>
#include <clients>
#include <hacks>
public OnPluginStart()
{
HookEvent("weapon_fire", Event_WeaponFire, EventHookMode_Pre);
}
public Action:Event_WeaponFire(Handle:event, const String:name[], bool:dontBroadcast)
{
new target_playerID = GetEventInt(event,"userid");
new target_playerClient = GetClientOfUserId(target_playerID);
PrintToChatAll("%s", GetPlayerName(target_playerClient));
}
GetPlayerName(any:target_playerClient)
{
new String:target_playerName[20];
GetClientName(target_playerClient,target_playerName,sizeof(target_playerName));
return target_playerName;
}