Raised This Month: $ Target: $400
 0% 

Lost xp on Teamkill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 08-20-2009 , 12:40   Lost xp on Teamkill
Reply With Quote #1

So i have start a server with kamkaaze. So i want that everbody shot on everbody...
well, when i kill a teammate i lost xp... but i should win xp!!!

so i have try sth. in the code in line 2093:

Code:
new userHealth = get_user_health(id)
    new FFon = get_cvar_num("mp_friendlyfire")
    if (userHealth - damage <= 0 ) {
        new bool:kill = false
        if (id == attacker) {
            kill = true
        }
        else if (FFon && get_user_team(id) == get_user_team(attacker)) {
            kill = true
            localAddXP(attacker, gXPGiven[ gPlayerLevel[id] ] )
            set_user_frags(attacker, get_user_frags(attacker) + 1)
            //client_print(attacker,print_center,"You killed a teammate")
            new money = get_user_money(attacker)
            if (money != 0) set_user_money(attacker,money + 150,1)
        }
        else if (get_user_team(id) != get_user_team(attacker)) {
            kill = true
            localAddXP(attacker, gXPGiven[ gPlayerLevel[id] ] )
            set_user_frags(attacker, get_user_frags(attacker) + 1)
            new money = get_user_money(attacker)
            if (money < 16000) set_user_money(attacker,money + 300,1)
        }

        if (!kill) return

        //Log the Kill
        //logKill(attacker, id, weaponDescription)

        //Kill the victim and block the messages
        MessageBlock(gmsgDeathMsg,BLOCK_ONCE)
        MessageBlock(gmsgScoreInfo,BLOCK_ONCE)
        user_kill(id)

        //user_kill removes a frag, this gives it back
        set_user_frags(id,get_user_frags(id) + 1)

        //Replaced HUD death message
        message_begin(MSG_ALL,gmsgDeathMsg,{0,0,0},0)
        write_byte(attacker)
        write_byte(id)
        write_byte(headshot)
        write_string(weaponDescription)
        message_end()

        //Update killers scorboard with new info
        message_begin(MSG_ALL,gmsgScoreInfo)
        write_byte(attacker)
        write_short(get_user_frags(attacker))
        write_short(get_user_deaths(attacker))
        write_short(0)
        write_short(get_user_team(attacker))
        message_end()

        //Update victims scoreboard with correct info
        message_begin(MSG_ALL,gmsgScoreInfo)
        write_byte(id)
        write_short(get_user_frags(id))
        write_short(get_user_deaths(id))
        write_short(0)
        write_short(get_user_team(id))
        message_end()

    }
    else {
        new bool:hurt = false
        if (id == attacker) {
            hurt = true
        }
        else if (FFon && get_user_team(id) == get_user_team(attacker)) {
            hurt = true
            new name[33]
            get_user_name(attacker,name,32)
            //client_print(0,print_chat,"%s attacked a teammate",name)
        }
        else if (get_user_team(id) != get_user_team(attacker)) {
            hurt = true
        }

        if (!hurt) return

        set_user_health(id, userHealth - damage)
        set_user_armor(id, plrArmor)

        new aOrigin[3]
        get_user_origin(attacker, aOrigin)

        //Damage message
        message_begin(MSG_ONE, gmsgDamage, {0,0,0}, id)
        write_byte(0) // dmg_save
        write_byte(damage) // dmg_take
        write_long(0) // visibleDamageBits
        write_coord(aOrigin[0]) // damageOrigin.x
        write_coord(aOrigin[1]) // damageOrigin.y
        write_coord(aOrigin[2]) // damageOrigin.z
        message_end()
    }
}
untested...!!!!!!!!!

well, i have tested some other settings, but it donīt work and i need this so quickly..!!!!
STr!ker is offline
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 08-22-2009 , 17:03   Re: Lost xp on Teamkill
Reply With Quote #2

why i donīt get help?
STr!ker is offline
Russiaboy
BANNED
Join Date: May 2009
Location: ZombiePlague is my Home
Old 08-23-2009 , 04:28   Re: Lost xp on Teamkill
Reply With Quote #3

Ich kann helfen hast du Steam oder so?

Ich versuch dir dann zu helfen!
Russiaboy is offline
Send a message via MSN to Russiaboy Send a message via Skype™ to Russiaboy
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 08-23-2009 , 14:09   Re: Lost xp on Teamkill
Reply With Quote #4

was soll das für eine Frage? natürlich habe ich steam. non-steam wird hier sowieso nicht supportet.
STr!ker is offline
Russiaboy
BANNED
Join Date: May 2009
Location: ZombiePlague is my Home
Old 08-24-2009 , 09:18   Re: Lost xp on Teamkill
Reply With Quote #5

name?

kla wird hier non-steam supportet
Russiaboy is offline
Send a message via MSN to Russiaboy Send a message via Skype™ to Russiaboy
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 08-25-2009 , 09:30   Re: Lost xp on Teamkill
Reply With Quote #6

STrike der name. wieso interresiert es dich?
STr!ker is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 08-25-2009 , 12:48   Re: Lost xp on Teamkill
Reply With Quote #7

English please, this is an english forum there is a section for Deutsch.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 08-26-2009 , 10:10   Re: Lost xp on Teamkill
Reply With Quote #8

sy i nees this in short time and i canīt wait for the next realase. so i have to decide to make it myself. but whatever i have tried wasnīt that i wanted. Russiaboy wanted to know whether i have steam. well of course i have steam and russiaboy. i have told him that non-steam user get a Ban and that it isnīt support. He can look at my last post. i have never support non-steam user. then he wanted to know my name, because "here is clearly non-steam supportet"! but that isnīt here. so can somebody help me in short time?
STr!ker is offline
n3m3s1s111
Junior Member
Join Date: Sep 2008
Old 08-27-2009 , 20:04   Re: Lost xp on Teamkill
Reply With Quote #9

uhm in my knownledge wasnt the teamkill thingy "fixed" in 1.2.0.10 Version of SH?..
n3m3s1s111 is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 08-27-2009 , 20:51   Re: Lost xp on Teamkill
Reply With Quote #10

Quote:
Originally Posted by n3m3s1s111 View Post
uhm in my knownledge wasnt the teamkill thingy "fixed" in 1.2.0.10 Version of SH?..
he wants to be able to teamkill without losing xp but gaining xp instead, this is not currently in SH. I told him I would add an option to do that in SH but it will take a long time, he wants it now and that's where we are.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
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 11:58.


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