Code:
#include <amxmodx>
enum DATA
{
DATA_NAME[32],
Float:DATA_HEALTH
};
new Data[33][DATA];
public plugin_init()
register_clcmd("say /test", "SayTest");
public SayTest(client)
{
Data[client][DATA_HEALTH] = _:100;
get_user_name(client, Data[client][DATA_NAME], 31);
client_print(client, print_chat, "[Test] Health: %f, name: %s", GetData(client, DATA_HEALTH), GetData(client, DATA_NAME));
return PLUGIN_HANDLED;
}
stock any:GetData(client, DATA:data)
return Data[client][data];
Is it possible to return full string when you have an enumeration/structure?
Currently it prints:
Code:
[Test] Health: 100.000000, name: h
when it should print my full name "hleV".
It also terminates the string and after the "h" nothing else is written.
__________________