XP when kill
#2

You already got a kill variable, dont you? I will call it gPlayerKills.
pawn Код:
// OnPlayerDeath
    if(killerid != INVALID_PLAYER_ID) {
        new
            expGain,
            kills = ++gPlayerKills[killerid]
        ;
        if(kills == 1) { // for the first kill
            expGain += 10; // 10 - 20 exp
        }
        if((kills % 5) == 0) { // for every fifth kill he gets bonus exp
            expGain += kills; // 5 kills = 5 - 10 exp | 10 kills = 10 - 20 exp | 15 kills = 15 - 30 exp
        }
        if(reason < 16) {
            expGain += 10; // melee kill = 10 - 20 exp
        } else {
            expGain += 5; // range kill = 5 - 10 exp
        }
        expGain += random(expGain); // random that he could get the double exp
    }
That were my toughts, add what you want
Reply


Messages In This Thread
XP when kill - by nicholas1 - 07.10.2012, 01:16
AW: XP when kill - by Nero_3D - 07.10.2012, 01:34
Re: XP when kill - by nicholas1 - 07.10.2012, 01:58
AW: XP when kill - by Nero_3D - 07.10.2012, 12:07
Re: XP when kill - by nicholas1 - 08.10.2012, 00:31
Re: XP when kill - by zSuYaNw - 08.10.2012, 04:20
Re: XP when kill - by Kitten - 08.10.2012, 05:04
Re: XP when kill - by zSuYaNw - 08.10.2012, 05:10
Re: XP when kill - by nicholas1 - 08.10.2012, 21:41
Re: XP when kill - by Kitten - 08.10.2012, 21:50

Forum Jump:


Users browsing this thread: 3 Guest(s)