Raised This Month: $51 Target: $400
 12% 

Repay (SentryIII)


Post New Thread Reply   
 
Thread Tools Display Modes
bumbastik
Member
Join Date: Jan 2007
Old 01-16-2007 , 08:57   Re: Repay (SentryIII)
Reply With Quote #21

heh sory))) dont answer. I just off check_shot plugin)
bumbastik is offline
hellomoto
Member
Join Date: Sep 2006
Old 01-18-2008 , 00:52   Re: Repay (SentryIII)
Reply With Quote #22

I have an issue. You know the max integer allowed on the CS hud is 255 health? Well, to remove confusion, is there a way to set the maximum health to 250 or whatever I choose? I want to keep it so anyone can continue gaining health until 250, at which point they stay at that, regardless of how many future headshots they get.
hellomoto is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 01-18-2008 , 01:19   Re: Repay (SentryIII)
Reply With Quote #23

Change the max in the .sma and recompile. I would add more detail if wasnt at work and could show the line in the sma.
__________________
bmann_420 is offline
hellomoto
Member
Join Date: Sep 2006
Old 01-18-2008 , 02:07   Re: Repay (SentryIII)
Reply With Quote #24

I did that in the sma file and it still doesn't work.

Here is what I changed:

Code:
public load_health(id){ 
    if (get_cvar_num("amx_repaysave") == 1){ 
        new health = healths[id] 
        if (health > 250){ 
            set_user_health(id,health) 
            client_print(id,print_chat,"* You have %d health because of your previous headshot!",health) 
        } 
    } 
    return PLUGIN_CONTINUE 
} 

public save_health(id){ 
    if (get_cvar_num("amx_repaysave") == 1){ 
        for(new i = 1; i <= get_maxplayers(); ++i) 
            { 
            healths[i] = get_user_health(i) 
        } 
    } 
    return PLUGIN_CONTINUE 
} 

public hs_kill(id){ 
    new killer = read_data(1) 
    new victim = read_data(2) 
    new Killer[33] 
    new Victim[33] 
    new math, math2 
    get_user_name(killer, Killer,32) 
    get_user_name(victim, Victim,32) 
    if (get_user_health(victim) <= 100){ 
        math = floatround(Float:(((100 - get_user_health(victim)) * (get_cvar_float("amx_repay") / 100)) + get_user_health(killer)), floatround_method:floatround_round) 
        math2 = floatround(Float:(((100 - get_user_health(victim)) * (get_cvar_float("amx_repay") / 100))), floatround_method:floatround_round) 
    } 
    if ((get_user_health(victim) > 100) && (get_user_health(victim) <= 200)){ 
        math = floatround(Float:(((200 - get_user_health(victim)) * (get_cvar_float("amx_repay") / 100)) + get_user_health(killer)), floatround_method:floatround_round) 
        math2 = floatround(Float:(((200 - get_user_health(victim)) * (get_cvar_float("amx_repay") / 100))), floatround_method:floatround_round) 
    } 
    if (get_user_health(victim) > 200){ 
        math = floatround(Float:(((300 - get_user_health(victim)) * (get_cvar_float("amx_repay") / 100)) + get_user_health(killer)), floatround_method:floatround_round) 
        math2 = floatround(Float:(((300 - get_user_health(victim)) * (get_cvar_float("amx_repay") / 100))), floatround_method:floatround_round) 
    } 
    if (get_cvar_num("amx_repaylimit") == 0){ 
        if (get_user_team(killer) != get_user_team(victim) && get_cvar_num("amx_repay") != 0){ 
            set_hudmessage(255,255,255, -1.0, -0.75, 2, 0.02, 10.0, 0.01, 0.1, 9) 
            set_user_health(killer, math) 
            if (get_cvar_num("amx_repayshow") == 0){ 
                show_hudmessage(0, "%s Was Awarded Health^nFor Killing %s With A Headshot!",Killer,Victim) 
                log_message("[REPAY] %s Got %d Health : Killed %s",Killer,math2,Victim) 
            } 
            if (get_cvar_num("amx_repayshow") == 1){ 
                show_hudmessage(0, "%s Was Awarded %d Health^nFor Killing %s With A Headshot!",Killer,math2,Victim) 
                log_message("[REPAY] %s Got %d Health : Killed %s",Killer,math2,Victim) 
            } 
        } 
    } 
    if (get_cvar_num("amx_repaylimit") == 1){ 
        if (get_user_health(killer) >= 250 && get_cvar_num("amx_repay") != 0){ 
            set_hudmessage(255,255,255, -1.0, -0.75, 2, 0.02, 10.0, 0.01, 0.1, 9) 
            show_hudmessage(0, "%s Got A Headshot On %s!^nNo Health Rewarded, MAX Health",Killer,Victim) 
            log_message("[REPAY] %s (MAX HEALTH) : Killed %s",Killer,Victim) 
        } 
        else if (get_user_team(killer) != get_user_team(victim) && get_cvar_num("amx_repay") != 0){ 
            set_hudmessage(255,255,255, -1.0, -0.75, 2, 0.02, 10.0, 0.01, 0.1, 9) 
            set_user_health(killer, math) 
            if (get_user_health(killer) > 250){ 
                set_user_health(killer, 250) 
            } 

            if (get_cvar_num("amx_repayshow") == 0){ 
                show_hudmessage(0, "%s Was Awarded Health^nFor Killing %s With A Headshot!",Killer,Victim) 
                log_message("[REPAY] %s Got %d Health : Killed %s",Killer,math2,Victim) 
            } 
            if (get_cvar_num("amx_repayshow") == 1){ 
                if (math > 250){ 
                    show_hudmessage(0, "%s Was Awarded %d Health^nBut Was Limited To Only 250 Health^nFor Killing %s With A Headshot!",Killer,math2,Victim) 
                    log_message("[REPAY] %s Got %d Health (LIMITED) : Killed %s",Killer,math2,Victim) 
                } 
                if (math < 250){ 
                    show_hudmessage(0, "%s Was Awarded %d Health^nFor Killing %s With A Headshot!",Killer,math2,Victim) 
                    log_message("[REPAY] %s Got %d Health : Killed %s",Killer,math2,Victim) 
                } 
            } 
        } 
    } 
    return PLUGIN_CONTINUE

Last edited by hellomoto; 01-18-2008 at 02:18.
hellomoto is offline
hellomoto
Member
Join Date: Sep 2006
Old 01-19-2008 , 00:46   Re: Repay (SentryIII)
Reply With Quote #25

Anyone?
hellomoto is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 01-19-2008 , 07:22   Re: Repay (SentryIII)
Reply With Quote #26

the way he did the math, it is a lil complicated, could be just me. But everything you changed has nothing to do with the max health. Give me some time, its 4 am for me and i just got home from the bar, illl getcha back
__________________
bmann_420 is offline
hellomoto
Member
Join Date: Sep 2006
Old 01-20-2008 , 00:27   Re: Repay (SentryIII)
Reply With Quote #27

Alright cool man. Thanks a lot.
hellomoto is offline
hellomoto
Member
Join Date: Sep 2006
Old 02-03-2008 , 00:08   Re: Repay (SentryIII)
Reply With Quote #28

Any idea?
hellomoto is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 02-03-2008 , 19:29   Re: Repay (SentryIII)
Reply With Quote #29

To complicated for me to really try and figure out. And too busy. sorry
__________________
bmann_420 is offline
bigfrill
Junior Member
Join Date: Dec 2007
Old 02-21-2008 , 17:55   Re: Repay (SentryIII)
Reply With Quote #30

can u put this in a .zip file plz
bigfrill is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:35.


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