[FilterScript] Advanced Killingspree System!
#9

rather than that I just made some small include, I wont bother releasing it, such a small script..

killstreak.inc
pawn Код:
/*
 *      Killstreak .inc by Lorenc
 *
 *      - For newbs that cannot be bothered to setup killstreak variables and stuff...
 *      - IS SO COOL!
 *
 *
*/


#include                        <a_samp>

#define KS_SHOW_WA_HAPPEN

#define KILLSTREAK_VAR          "killstreak_Killstreak"

forward KillstreakData(playerid, killstreak);

public OnPlayerDeath(playerid, killerid, reason)
{
    SetPVarInt( killerid, KILLSTREAK_VAR, GetPVarInt( killerid, KILLSTREAK_VAR ) + 1 );
    CallLocalFunction( "KillstreakData", "ddd", killerid, GetPVarInt( killerid, KILLSTREAK_VAR ), playerid);
    SetPVarInt( playerid, KILLSTREAK_VAR, 0 );
    return CallLocalFunction( "killstreak_OnPlayerDeath", "ddd", playerid, killerid, reason );
}

#if defined _ALS_OnPlayerDeath
    #undef OnPlayerDeath
#else
    #define _ALS_OnPlayerDeath
#endif
#define OnPlayerDeath killstreak_OnPlayerDeath
forward killstreak_OnPlayerDeath( playerid, killerid, reason );
Haven't tested it though should work, all you do is:

pawn Код:
public KillstreakData(playerid, killstreak, endedksplayer)
{
    /*
        - playerid = the person that made this call back call
        - killstreak = what killstreak he is on
        - endedksplayer = the player 'playerid' has killed to end there ks
    */

    switch(killstreak)
    {
        case 1: {} // KS 1
        case 2: {} // KS 2
        case 3: {} // KS 3
        case 4: {} // KS 4
    }
    return 1;
}
Its more tidy though because it uses PVars it'll be slightly inefficient, the point is I don't wanna hook so many functions to reset a variable..

Players can use this inside there GM without even the filterscript.
Reply


Messages In This Thread
Simple Killingspree System! - by Chrillzen - 08.08.2011, 00:32
Re: Advanced Killingspree System! - by TheArcher - 08.08.2011, 00:37
Re: Advanced Killingspree System! - by Chrillzen - 08.08.2011, 00:37
Re: Advanced Killingspree System! - by Kitten - 08.08.2011, 00:52
Re: Advanced Killingspree System! - by Chrillzen - 08.08.2011, 00:57
Re: Advanced Killingspree System! - by KeeDee - 08.08.2011, 02:58
Re: Advanced Killingspree System! - by Chrillzen - 08.08.2011, 05:24
Re: Advanced Killingspree System! - by wups - 08.08.2011, 07:39
Re: Advanced Killingspree System! - by Lorenc_ - 08.08.2011, 08:33
Re: Advanced Killingspree System! - by Chrillzen - 08.08.2011, 10:52
Re: Advanced Killingspree System! - by Davz*|*Criss - 08.08.2011, 11:00
Re: Advanced Killingspree System! - by Chrillzen - 08.08.2011, 11:10
Re: Advanced Killingspree System! - by Kerlan - 07.10.2011, 21:55
Re: Advanced Killingspree System! - by Lordzy - 24.03.2012, 01:35
Re: Advanced Killingspree System! - by mickos - 13.07.2012, 12:31
Re: Advanced Killingspree System! - by Er@x3r - 12.10.2012, 13:07
Re: Advanced Killingspree System! - by Chrillzen - 11.03.2014, 14:04

Forum Jump:


Users browsing this thread: 1 Guest(s)