Modificare admin_heal

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 18:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

10 Sep 2010, 23:59

Ce face acest plugin ?
In momentul in care un admin are de exemplu 70 hp si merge langa un jucator normal ( nu admin ) si apasa e , adminului i se incarca viata pana la 100 .
Ce vreau eu ?
Vreau ca si jucatorii intre ei sa isi poata reincarca viata nu doar adminii de la jucatori , dar nu ca un jucator cu 50 hp de exemplu merge langa alt jucator si apasa e si isi reincarca viata . Eu vreau ca acel player la care a mers sa ii reincarce viata
Deci jucator x are 70 hp . Daca jucatorul y merge langa jucatorul x si apasa "e" in dreptul acestuia , jucatorului x sa i se incarca viata pana la 100 hp . Daca jucatorul x apasa "e" in dreptul jucatorulu y si acestuia sa i se incarca viata pana la 100 , iar daca are 100 hp sa ii apara un mesaj : Jucatorul are deja 100 hp !
Deci pe scurt vreau ca jucatoriii ( nu doar adminii ) sa isi poata reincarca viata intrei ei si daca un jucator are 100 hp celui care vrea sa ii reincarce viata sa ii apara : Jucatorul are deja 100 hp !
Multumesc anticipat
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>

#define PLUGIN "Admin Heal"
#define VERSION "0.1b"
#define AUTHOR "SAMURAI"

#define BUTTON IN_USE
#define CharsMax(%1) sizeof(%1) - 1

new gPcvar;

new playerClass[] = "player";

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    gPcvar = register_cvar("admin_heal","1");
    
    register_forward(FM_PlayerPreThink,"fw_prethink");
}

public fw_prethink(id)
{
    if(!get_pcvar_num(gPcvar) )
        return FMRES_IGNORED;
    
    if(!is_user_admin(id) ) 
        return FMRES_IGNORED;
    
    static temp, target;
    
    if ( pev(id, pev_button) & BUTTON && ! ( pev(id, pev_oldbuttons) & BUTTON ) ) 
    {
        static dist, i;
        for(i = 29; i< 34; i++)
            dist = i;

        get_user_aiming(id, target, temp, dist);
        
        if(!pev_valid(target))
            return FMRES_IGNORED;
        
        static classname[32];
        pev(target, pev_classname, classname, CharsMax(classname) );
        
        if(!strcmp(playerClass,classname) )
        {
            if(get_user_health(id) < 100 )
            {
                static delta;
                delta = 100 - get_user_health(id);
                
                set_user_health(id,get_user_health(id) + delta);
                
                client_print(id,print_chat,"[Admin Heal] You got %d health !",delta);
            }
        }
    }
    
    
    return FMRES_IGNORED;
}
Retras din activitate.
compaq
Fost moderator
Fost moderator
Posts: 2598
Joined: 01 Dec 2008, 15:32
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Fost contribuitor
Fost manager
Fost Scripter eXtreamCS
Has thanked: 15 times
Been thanked: 150 times

13 Sep 2010, 11:44

Vezi asa:
| Afiseaza codul
[code]#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>

#define PLUGIN "Heal"
#define VERSION "0.1b"
#define AUTHOR "SAMURAI"

#define BUTTON IN_USE
#define CharsMax(%1) sizeof(%1) - 1

new gPcvar;

new playerClass[] = "player";

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    gPcvar = register_cvar("admin_heal","1");
    
    register_forward(FM_PlayerPreThink,"fw_prethink");
}

public fw_prethink(id)
{
    if(!get_pcvar_num(gPcvar) )
        return FMRES_IGNORED;
    
    static temp, target;
    
    if ( pev(id, pev_button) & BUTTON && ! ( pev(id, pev_oldbuttons) & BUTTON ) ) 
    {
        static dist, i;
        for(i = 29; i< 34; i++)
            dist = i;

        get_user_aiming(id, target, temp, dist);
        
        if(!pev_valid(target))
            return FMRES_IGNORED;
        
        static classname[32];
        pev(target, pev_classname, classname, CharsMax(classname) );
        
        if(!strcmp(playerClass,classname) )
        {
            if(get_user_health(target) < 100 )
            {
                static delta;
                delta = 100 - get_user_health(id);
                
                set_user_health(target,get_user_health(id) + delta);
                
                client_print(id,print_chat,"[Admin Heal] You got %d health !",delta);
            }

        else if( get_user_health( target ) == 100 )
        {
            client_print( id, print_chat, "Jucatorul are deja 100 hp!" );
        }
        }
    }
    
    
    return FMRES_IGNORED;
}[/code]
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 18:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

14 Sep 2010, 20:00

merge dar mesajele nu sunt bune adica nu apar bine in chat
Cand i-am reincarcat viata unui jucator imi apare

Code: Select all

[Admin Heal] You got 0 health !
Bine aici pot modifica eu sa apara

Code: Select all

I-ai reincarcat viata jucatorului %s
Dar dupa ce ii reincarc viata si ajunge la 100 imi apare

Code: Select all

Jucatorul are deja 100 hp!
si acest mesaj vreau sa apara doar daca are deja 100 hp
Cand ii reincarc viata si ajunge la 100 hp vreau sa apara :

Code: Select all

I-ai reincarcat viata jucatorului %s
si jucatorului care i-am reincarcat viata sa'i apara :

Code: Select all

%s ti-a reincarcat viata !
Daca are deja 100 hp sa'i apara :

Code: Select all

Jucatorul are deja 100 hp!
Si daca ai putea atunci cand apesi "e" si jucatorul are deja 100 hp sa se auda acel sunet ca la hl cand iti reincarci viata de la acel aparat
Si cand ii reincarci viata sa se auda iara un sunet tot din hl
Cred ca sti de care sunete vorbesc , dar eu nu stiu cum se numesc :D
Retras din activitate.
compaq
Fost moderator
Fost moderator
Posts: 2598
Joined: 01 Dec 2008, 15:32
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Fost contribuitor
Fost manager
Fost Scripter eXtreamCS
Has thanked: 15 times
Been thanked: 150 times

16 Sep 2010, 14:39

Gaseste numele sunetului.
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 18:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

16 Sep 2010, 16:17

deci atunci cand jucatorul are deja 100 hp sa se auda acest sunet :

Code: Select all

valve\sound\items\medshotno1.wav
cand ii reincarci viata si apesi "e" (cand jucatorul are mai putin de 100 hp) sa se auda acest sunet

Code: Select all

valve\sound\items\medshot4.wav
si in continuare pana cand jucatorul ia mana de pe butonul "e" sa se auda acest sunet

Code: Select all

valve\sound\items\medcharge4.wav
Retras din activitate.
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 18:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

19 Sep 2010, 00:51

H3adShoT wrote:deci atunci cand jucatorul are deja 100 hp sa se auda acest sunet :

Code: Select all

valve\sound\items\medshotno1.wav
cand ii reincarci viata si apesi "e" (cand jucatorul are mai putin de 100 hp) sa se auda acest sunet

Code: Select all

valve\sound\items\medshot4.wav
si in continuare pana cand jucatorul ia mana de pe butonul "e" sa se auda acest sunet

Code: Select all

valve\sound\items\medcharge4.wav
Retras din activitate.
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 18:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

22 Sep 2010, 18:03

H3adShoT wrote:
H3adShoT wrote:deci atunci cand jucatorul are deja 100 hp sa se auda acest sunet :

Code: Select all

valve\sound\items\medshotno1.wav
cand ii reincarci viata si apesi "e" (cand jucatorul are mai putin de 100 hp) sa se auda acest sunet

Code: Select all

valve\sound\items\medshot4.wav
si in continuare pana cand jucatorul ia mana de pe butonul "e" sa se auda acest sunet

Code: Select all

valve\sound\items\medcharge4.wav
Retras din activitate.
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 18:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

27 Sep 2010, 14:47

H3adShoT wrote:
H3adShoT wrote:
H3adShoT wrote:deci atunci cand jucatorul are deja 100 hp sa se auda acest sunet :

Code: Select all

valve\sound\items\medshotno1.wav
cand ii reincarci viata si apesi "e" (cand jucatorul are mai putin de 100 hp) sa se auda acest sunet

Code: Select all

valve\sound\items\medshot4.wav
si in continuare pana cand jucatorul ia mana de pe butonul "e" sa se auda acest sunet

Code: Select all

valve\sound\items\medcharge4.wav
Retras din activitate.
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 18:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

01 Oct 2010, 11:38

H3adShoT wrote:
H3adShoT wrote:
H3adShoT wrote:
Retras din activitate.
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 18:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

05 Oct 2010, 09:31

H3adShoT wrote:
H3adShoT wrote:
H3adShoT wrote:
Retras din activitate.
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 18:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

11 Oct 2010, 15:41

up !!!!!!
Retras din activitate.
User avatar
H3adShoT
Membru, skill +3
Membru, skill +3
Posts: 1254
Joined: 03 May 2009, 18:19
Detinator Steam: Da
CS Status: Nu mai incercati sa-mi furati contul!
Detinator server CS: Nimic
SteamID: PM
Reputatie: Restrictie moderator
Location: Hunedoara
Has thanked: 47 times
Been thanked: 92 times
Contact:

18 Dec 2010, 14:22

up !
chiar nu stie nimeni ? :D
Retras din activitate.
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests