I just solved it ! It might not be the best way of doing it, but Thank god it works atleast.
Please, if anyone got a better way of doing it, please do post below. I will continue to look into it.
PHP Code:
if (is_valid_ent(ptd))
{
// Set PTD Classname to player, because it is set to sentry instead of player, which is breaking the fakedamage part of the code //
SET_classname(ptd, "player")
// End Here -----------------------------------
if (equal(trg, "player"))
{
// ptr is still sentrybullet and should be and owner is specific player.
new attacker = GET_owner(ptr)
if (!is_user_connected(attacker)) return PLUGIN_CONTINUE
new ent = has_sentry[attacker]
// Additonal Code needs to be added here : Get players ids and only set opposing team to be shot at.)
new players[32], pnum, victim
get_players(players, pnum, "ah")
for (new i = 0; i < pnum; i++)
{
victim = players[i]
}
//victim = pnum // It kills all the enemies as soon as the sentry spots one whether the rest are in range or not, because pnum probably holds all their ids.
//client_print(0, print_chat, "------Test 1 VictimsID - %d ---------", victim);
// End Here