[Tutorial] How To Make Kill Streaks!
#3

Very simple and useful.

Change
Code:
if(KillStreak[killerid] == 1) //You wouldn't really count 1 kill as a streak but it gives you an idea
    {       
        format(str, sizeof(str), "~r~ %s is on a kill!", PlayerName);
        GameTextForAll(str,4000,4);
    }

    if(KillStreak[killerid] == 2)
    {
        format(str, sizeof(str), "~r~ %s is on a ~b~double kill!", PlayerName);
        GameTextForAll(str,4000,4);
    }
    if(KillStreak[killerid] == 3)
    {
        format(str, sizeof(str), "~y~%s is on a ~r~killing spree!", PlayerName);
        GameTextForAll(str,4000,4);
    }
    if(KillStreak[killerid] == 4)
    {
        format(str, sizeof(str), "~g~%s is on a ~b~mmmmmonster kill!", PlayerName);
        GameTextForAll(str,4000,4);
    }
    if(KillStreak[killerid] == 5)
    {
        format(str, sizeof(str), "~r~%s is ~p~dominating!", PlayerName);
        GameTextForAll(str,4000,4);
    }
    if(KillStreak[killerid] == 6)
    {
        format(str, sizeof(str), "~p~%s is ~y~unstopable!", PlayerName);
        GameTextForAll(str,4000,4);
    }/*
    if(KillStreak[killerid] == 7) //You can do this as many times as you like
    {
        format(str,sizeof(str),"%s is annihilating!",Killername);
        GameTextForAll(str,4000,4);
    }
    if(KillStreak[killerid] == 10)
    {
        format(str,sizeof(str),"%s is GodLike!",Killername);
        GameTextForAll(str,4000,4);
    }*/
to
Code:
switch( KillStreak[ killerid ] ) 
{
	case 1: //You wouldn't really count 1 kill as a streak but it gives you an idea
    {       
        format(str, sizeof(str), "~r~ %s is on a kill!", PlayerName);
        GameTextForAll(str,4000,4);
    }
    case 2:
    {
        format(str, sizeof(str), "~r~ %s is on a ~b~double kill!", PlayerName);
        GameTextForAll(str,4000,4);
    }
    case 3:
    {
        format(str, sizeof(str), "~y~%s is on a ~r~killing spree!", PlayerName);
        GameTextForAll(str,4000,4);
    }
    case 4:
    {
        format(str, sizeof(str), "~g~%s is on a ~b~mmmmmonster kill!", PlayerName);
        GameTextForAll(str,4000,4);
    }
    case 5:
    {
        format(str, sizeof(str), "~r~%s is ~p~dominating!", PlayerName);
        GameTextForAll(str,4000,4);
    }
    case 6:
    {
        format(str, sizeof(str), "~p~%s is ~y~unstopable!", PlayerName);
        GameTextForAll(str,4000,4);
    }/*
    case 7: //You can do this as many times as you like
    {
        format(str,sizeof(str),"%s is annihilating!",Killername);
        GameTextForAll(str,4000,4);
    }
    case 10:
    {
        format(str,sizeof(str),"%s is GodLike!",Killername);
        GameTextForAll(str,4000,4);
    }*/
}
'switch' is faster.
Reply


Messages In This Thread
How To Make Kill Streaks! - by brett7 - 23.09.2011, 15:55
Re: How To Make Kill Streaks! - by Max_Coldheart - 23.09.2011, 18:07
Re: How To Make Kill Streaks! - by IstuntmanI - 23.09.2011, 18:14
Re: How To Make Kill Streaks! - by brett7 - 24.09.2011, 19:40
Re: How To Make Kill Streaks! - by xMaGmOtAnEtHx - 18.08.2012, 00:52
Re: How To Make Kill Streaks! - by Coder_ - 19.08.2012, 12:23
Re: How To Make Kill Streaks! - by Error000 - 31.01.2014, 22:12
Re: How To Make Kill Streaks! - by SeV_ - 31.01.2014, 22:18

Forum Jump:


Users browsing this thread: 2 Guest(s)