User
Pass
2FA
 
 

Cerere plugin mirror damage

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Tutorials
Author Message1975
ink

[Mentally Stable]



Status: Offline
(since 26-03-2020 10:43)
Joined: 31 Jan 2012
Posts: 5, Topics: 2
Location: Romania

Reputation: 65.2
Votes: 2

 
Post Posted: 31-01-2012, 14:21:35 | Translate post to: ... (Click for more languages)

Salut tuturor

Am cautat mult dar nu am gasit asa ceva care sa fie pe placul meu

vreau un plugin de genul mirror_damage dar vreau ca cel care trage in coechipier sa ia tot damage-ul provocat dar victima sa ramana cu HP intact.

Poate sa ma ajute cineva?

daca va ajuta,am gasit 2 pluginuri,dar nu au efectul dorit

primul se activeaza cand friendlyfire este on,dar provoaca damage si victimei,iar eu nu vreau asta

Code:
/* Mirror damage
About:
This plugin mirrors damage on friendly fire servers.

Modules required: fun

FAQ)
Q) Can i use this plugin on a lan server?
A) No.

Plugin forum thread: http://www.amxmodx.org/forums/viewtopic.php?p=80463

Credits:
Ops in #AMXmodx @ Quakenet for alot of help ( + AssKicker & CheesyPeteza )
*/

#include <amxmodx>
#include <fun>

public plugin_init()
{
   register_plugin("Mirror Damage","1.0.0","EKS")
   register_event("Damage", "Event_Damage", "b", "2!0", "3=0", "4!0" );
   return PLUGIN_CONTINUE
}
public Event_Damage()
{
   new damage = read_data(2);
   new victim = read_data(0);
   new attacker = get_user_attacker(victim)
   if(get_user_team(victim) == get_user_team(attacker) && victim != attacker)
   {
      new HP = get_user_health(attacker) - damage
      if(HP > 0)   set_user_health(attacker,(get_user_health(attacker)-damage))
      else user_kill(attacker)
      
      new VictimN[32]
      get_user_name(victim,VictimN,31)
      client_print(attacker,print_chat,"[AMXX] You team attacked %s and lost %d hp",VictimN,damage)
   }
}


iar cel de-al doilea are efectul dorit,dar fie ca ff-ul este on sau off el face ca coechipiereii sa primeasca damage
Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

new iMaxPlayers;

#define IsPlayer(%1)    (1<=%1<=iMaxPlayers)

public plugin_init()
{
    register_plugin("mirror_damage", AMXX_VERSION_STR, "EKS")
    RegisterHam( Ham_TakeDamage , "player" , "fw_HamTakeDamage" );
   
    iMaxPlayers = get_maxplayers();
}

public fw_HamTakeDamage( iVictim , iInflictor , iAttacker , Float:fDamage , iDmgBits )
{
    if ( !IsPlayer( iAttacker ) || !( cs_get_user_team( iVictim ) == cs_get_user_team( iAttacker ) ) )
        return HAM_IGNORED;
       
    SetHamParamEntity( 1 , iAttacker );
   
    return HAM_HANDLED;




Va rog frumos,ori sa modificati unul din pluginuri,ori sa faceti o combinatie dar numai sa iasa treaba buna

Multumesc anticipat!

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
XphaN

[mojito.freakz.ro]



Status: Offline
(since 31-01-2014 18:23)
Joined: 30 Mar 2009
Posts: 130, Topics: 20
Location: Bucuresti

Reputation: 126.3
Votes: 9

 
Post Posted: 31-01-2012, 23:03:03 | Translate post to: ... (Click for more languages)

http://forums.alliedmods.net/showthread.php?p=973172


Cu placere.



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
ink

[Mentally Stable]



Status: Offline
(since 26-03-2020 10:43)
Joined: 31 Jan 2012
Posts: 5, Topics: 2
Location: Romania

Reputation: 65.2
Votes: 2

 
Post Posted: 01-02-2012, 14:49:11 | Translate post to: ... (Click for more languages)

Multumesc mult!!!
o sa il incerc sa vad daca functioneaza asa cum vreau si o sa revin cu replay.
PS.imediat ce o sa pot,o sa iti adaug reputatie



edit: Merge perfect !!! Inca o data multumesc mult

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID

  Topic locked


Topic is closed, you cannot post any messages in it anymore




 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Tutorials  


The time now is 19-04-2024, 21:32:01
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x