AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Personal Firendly Fire (https://forums.alliedmods.net/showthread.php?t=56181)

bmann_420 06-08-2007 05:38

Personal Firendly Fire
 
I dont know if their is a way to do friendly fire on just a particular person, but if their is it would be nice. Per say, a toggle button like +pff Bind that so when you press the button you can enable friendly fire on you just while you hold it, or maybe till you hit it again to turn it off if possible.

It would come in handy for campers when your lookin out for em and just many regulatory things in the server. :D

_Master_ 06-08-2007 08:35

Re: Personal Firendly Fire
 
It would be possible.
Hook FM_TraceLine and check if trace result is a "valid" player.

Juba_PornBorn 06-08-2007 10:13

Re: Personal Firendly Fire
 
this would be cool and without tk punish! Revenge on the MF who went in front of you while you aimed and got you both killed or on bomb guy that just went way for a minute.

bmann_420 06-08-2007 15:20

Re: Personal Firendly Fire
 
Yes, and im sorry Master, but im not that good of a scriptor to come up with that.

Johnny got his gun 06-08-2007 18:24

Re: Personal Firendly Fire
 
Hey, that's a cool idea, two posts up. To slap a bomb-holding teammate who is AFK, which makes him lose the bomb. Why not...

bmann_420 06-08-2007 23:50

Re: Personal Firendly Fire
 
But no help eh :/ Exept for Master of course who send me the tracelines, but I cannot do anything with them. Its beyond my skill level by far.
Code:

//________________________________________________________________________________________
//
//    FM_Trace_Line() - Executing Global and module specific settings to FM_Trace_Line()
//________________________________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public FM_Trace_Line(Float:start[3], Float:end[3], noMonsters, id, trace){
    new hit_ok
    new victim = get_tr(TR_pHit) // Victim ID
    new hitgroup = get_tr(TR_iHitgroup) // Hitgroup
   
    if(util_check_state(PCVAR_ADMINMODXX)){
       
        if(util_is_valid_player(id) && util_is_valid_player(victim)){
           
#if defined _AMMXX_USE_REPORTER_                    // REPORTER INCLUDED
            if(MODULE_OK == util_is_module_active(MODULE_REPORTER)){
               
                // Take SS if ok
                if(REP_SS_MODE[id] & MODE_C){
                   
                    if(REP_SS_MODE[id] & MODE_F){
                        new ptime[10], pname[32], pip[16], pid[35]
                       
                        get_time("%H:%M:%S", ptime, 9)
                        get_user_name(id, pname, 32)
                        get_user_ip(id, pip, 15, 1)
                        get_user_authid(id, pid, 34)
                       
                        client_print(id, print_chat, "%L", LANG_PLAYER, "REP_SS_STAMP", PLUGINHEAD, ptime, pname, pip, pid)
                    }
                   
                    client_cmd(id, "snapshot")
                    if(REP_SS_MODE[id] & MODE_E) client_print(id, print_chat, "%L", PLUGINHEAD, LANG_PLAYER, "REP_SS_SHOWSELF")
                }
            }
#endif                                    // END REPORTER INCLUDED
           
            // Is valid hit ?
            hit_ok = ((1<<hitgroup) & GLOBAL_HITZONES[id][victim])
           
            // Not a valid hit
            if(!hit_ok){
               
                set_tr(TR_flFraction, 1.0)
                set_tr(TR_pHit, -1)
                set_tr(TR_iHitgroup, 0)
            }
        }
    }

#if defined _AMMXX_USE_FUN_                        // FUN INCLUDED
    if(hit_ok && MODULE_OK == util_is_module_active(MODULE_FUN)){
        new trash = util_check_state(PCVAR_FUN_WEAPONIMMUNITY)
       
        if(trash){
            if((trash < 0 && util_is_valid_player(victim, 1, 1)) || trash == 1){
                new wpn_id = get_user_weapon(id, trash, trash)
               
                if(util_get_bit(IMMUNETOWEAPON[victim], wpn_id - 1)){
                   
                    set_tr(TR_flFraction, 1.0)
                    set_tr(TR_pHit, -1)
                    set_tr(TR_iHitgroup, 0)
                    hit_ok = 0
                }
            }
        }
    }
#endif                                    // END FUN INCLUDED
   
    if(hit_ok) return FMRES_IGNORED
    return FMRES_SUPERCEDE
}


regalis 06-09-2007 04:07

Re: Personal Firendly Fire
 
Hmm, if Friendlyfire is disable the only thing you can do is give fakedamage...
But how much? :P
10 HP per bullet or more!?

greetz regalis

bmann_420 06-09-2007 04:46

Re: Personal Firendly Fire
 
well then that would fall into hit points and all that fun stuff... eh? THought it would be simpiler than that, but eeks. Can find that all out tho on previous plugins and estimated damage.


All times are GMT -4. The time now is 02:07.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.