I want the flashlight to work for Ct's only and block the flashlight for T's. This plugin is allowing both t's and ct's to use a flashlight. I just want Ct's with flashlight

. I did change it to if(cs_get_user_team(player) == CS_TEAM_CT) but didnt help.
Code:
#include <amxmodx>
#include <engine>
#include <cstrike>
#include <fun>
#define PLUGIN "Terrorists are not allowed a flashlight"
#define VERSION "1.0"
#define AUTHOR "Amxmodx community"
new bool:can_impulse[32]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("round_start", 2, "1=Round_Start")
}
public round_start()
{
new players[32], num
get_players(players, num)
new player
for(new i = 0; i < num; i++)
{
player = players[i]
if(cs_get_user_team(player) == CS_TEAM_CT)
{
can_impulse[player] = true
}
else
return 1;
}
return 1;
}
public client_impulse(id,impulse)
{
if(!can_impulse[id] && impulse == 100)
{
return 1;
}
return 0;
}