Like this example using strings.
new g_szNames[33][32];
get_user_name(id,g_szNames[id],charsmax(g_szNames[]));
Explanation:
id is a id used for any player, when connect to server.
the g_szName[id] is used by array to assign the name for a player.
if I get the id 8, its means like g_szNames[8]; (But using ID instead of number 8 LOL);
for the charsmax, its get a maximum size of string -1 (After the my ID array);
For usage in any function, you should use
client_print(0,print_chat,"[AMXX] %s connected to server!",g_szNames[id]); // Always using ID never its 0 or g_szNames only !!
Ps.
PHP Code:
#include <amxmodx>
#include <csx>
public plugin_init() register_plugin("My HS",AMXX_VERSION_STR,"Amxx Dev Team");
public client_death(iKiller,iVictim,iWP,iPlace,iTK)
{
if(iPlace == HIT_HEAD)
{
new szName[2][32];
get_user_name(iKiller,szName[0],charsmax(szName[]));
get_user_name(iVictim,szName[1],charsmax(szName[]));
client_print(0,print_chat,"[AMXX] %s Killed %s with a Amazing Headshot!!",szName[0],szName[1]);
}
}
__________________