where is the problem?
compile is success.
however echo error by hlds.
[CSTRIKE] Player out og range (0)
[AMXX] Run time error 10 (plugin "round_start_give_health.amxx") "native "cs_get_user_team") - debug not enable!
what is this?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define PLUGIN "Health Fix"
#define VERSION "1.0"
#define AUTHOR "AUTHOR"
#define T_ARMOR 155
#define T_HEALTH 155
#define CT_ARMOR 255
#define CT_HEALTH 255
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_logevent("RoundStart", 2, "1=Round_Start");
}
public RoundStart()
{
new Players[32]
new playerCount, i, player
get_players(Players, playerCount, "b")
for (i=0; i<playerCount; i++)
player = Players[i]
if(cs_get_user_team(player) == CS_TEAM_T) {
set_user_armor(player, T_ARMOR);
set_user_health(player, T_HEALTH);
} else {
set_user_armor(player, CT_ARMOR);
set_user_health(player, CT_HEALTH);
}
return PLUGIN_HANDLED;
}