I have problem on enums :/
See my code:
PHP Code:
enum _:p_DataColumns
{
max_health
}
new p_Data[ p_DataColumns ][ ClassColumnStruct ] =
{
{ "max_health", Column_Int, 11 }
}
public plugin_init()
{
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1);
}
public Player_Spawn(id)
{
client_print(id, print_chat, "New HP: %d", p_Data[id][max_health])
}
public client_putinserver(id)
{
p_Data[id][max_health] = 200
}
Player_Spawn is not returning the correct value. Why?