Raised This Month: $94 Target: $400
 23% 

X-Kills


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   GHW_Chronic (70)
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 07-31-2006 , 09:03   X-Kills
Reply With Quote #1

this was requested long ago but no one made it

eXtra-Kills
Author: Mini_Midget
Version: 1.3
Modules: Fun
Description:
For every headshot kill you get, your frags will increase by 2 (depending on cvar) but for every Team-Kill headshot, it will decrease by 2 (depending on cvar)

Commands:
amx_hs-kills "2"

Changelog:
Version 1.0
First release
Version 1.1
Less brackets and more readable (Greenberet)
Version 1.2
SweatyBanana helped
Small clean up
Version 1.3
Helped from GHW_Chronic
Made the cvar more better to understand
Deleted AMXX studio notes
Attached Files
File Type: sma Get Plugin or Get Source (X-Kills.sma - 4532 views - 750 Bytes)
__________________
It's a mystery.

Last edited by Mini_Midget; 08-09-2006 at 06:50.
Mini_Midget is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 07-31-2006 , 09:12   Re: X-Kills
Reply With Quote #2

Dont see anything wrong whit this, gj
Deviance is offline
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 07-31-2006 , 09:15   Re: X-Kills
Reply With Quote #3

Quote:
Originally Posted by Doombringer
Dont see anything wrong whit this, gj
thxs man, first plugin too! (even though this took only 2hours, i was watching t.v at the same time...)
__________________
It's a mystery.
Mini_Midget is offline
Thriller
Junior Member
Join Date: Jul 2006
Old 07-31-2006 , 09:44   Re: X-Kills
Reply With Quote #4

Fun.^^
Thriller is offline
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 07-31-2006 , 14:25   Re: X-Kills
Reply With Quote #5

not bad gj
k007 is offline
Send a message via MSN to k007
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 07-31-2006 , 15:09   Re: X-Kills
Reply With Quote #6

i would change your deathmsg function to this
Code:
public deathmsg(id) {     new id = read_data(1)     new victim = read_data(2)     new headshot = read_data(3)         new frags = get_user_frags(id)         if (!is_user_alive(id) || !headshot )         return PLUGIN_CONTINUE         if (get_user_team(id) == get_user_team(victim))         set_user_frags(id, frags - get_pcvar_num(hs_kills))     else         set_user_frags(id, frags + get_pcvar_num(hs_kills))                     return PLUGIN_CONTINUE }
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 07-31-2006 , 15:11   Re: X-Kills
Reply With Quote #7

Why not:

PHP Code:
     if(!headshot)
        return 
PLUGIN_CONTINUE 
You cant get a headshot after ur dead can u?


Or do nades count as headshots?
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 08-01-2006 , 01:11   Re: X-Kills
Reply With Quote #8

not to sure if nade kills are headshot kills but pretty sure they aren't
anywho, i'm gonna upload the new version, nothing much changed but i'm just using Greenberet's method cause its a bit more easier to read has less brackets

EDIT
Version 1.1 up
any ideas would be nice
__________________
It's a mystery.

Last edited by Mini_Midget; 08-01-2006 at 01:15.
Mini_Midget is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 08-01-2006 , 02:07   Re: X-Kills
Reply With Quote #9

You should only call things once in the same function...

PHP Code:
public deathmsg(id)
{
    new 
id read_data(1)
    new 
victim read_data(2)
    new 
headshot read_data(3)

    new 
frags get_user_frags(id)
    new 
hsKills get_pcvar_num(hs_kills)

    if (!
is_user_alive(id) || !headshot )
        return 
PLUGIN_CONTINUE

    
if (get_user_team(id) == get_user_team(victim))
        
set_user_frags(idfrags hsKills)
    else
        
set_user_frags(idfrags hsKills)
    return 
PLUGIN_CONTINUE

SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 08-01-2006 , 02:11   Re: X-Kills
Reply With Quote #10

Quote:
Originally Posted by SweatyBanana
You should only call things once in the same function...

PHP Code:
public deathmsg(id)
{
    new 
id read_data(1)
    new 
victim read_data(2)
    new 
headshot read_data(3)

    new 
frags get_user_frags(id)
    new 
hsKills get_pcvar_num(hs_kills)

    if (!
is_user_alive(id) || !headshot )
        return 
PLUGIN_CONTINUE

    
if (get_user_team(id) == get_user_team(victim))
        
set_user_frags(idfrags hsKills)
    else
        
set_user_frags(idfrags hsKills)
    return 
PLUGIN_CONTINUE

hmm, didn't know that,
makes the script abit cleaner too i guess
thxs, uploaded new version
__________________
It's a mystery.
Mini_Midget is offline
Reply


Thread Tools
Display Modes

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 08:07.


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