View Single Post
tryout101
Member
Join Date: Mar 2009
Old 06-16-2016 , 23:24   Re: Modern warfare 2 Mod v1.3.6b
Reply With Quote #407

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], pnumvictim
                get_players
(playerspnum"ah")
                for (new 
0pnumi++)
                {
                    
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 

Last edited by tryout101; 06-17-2016 at 03:15.
tryout101 is offline