HELP KILLING SPREE
#1

WHy when player get 2 kills he have message is killing spree with 3 kills

Код:
    Streaks[killerid] += 1;
    Streaks[playerid] = 0;
    switch(Streaks[killerid]) //IMPORTANT: with the function "switch", you're switching / toggling through the killstreaks of a player (Streals). you need the killerid here, because the playerid is the one which is GETTING killed
	    {
	        case 3:
	        {
               format(gString,SOS," %s Has a killing spree (3 kills) (Reward:300$ + 2 score)",GetName(killerid));
	           SendClientMessageToAll(GREEN, gString);
	           SetPlayerScore(killerid,GetPlayerScore(killerid)+2);
	           GivePlayerMoney(killerid, 300);
	           SendClientMessage(killerid, GREEN,"You recieved 300$ and +2 scores for your 3 spree!");
	        }
	        case 6:
	        {
	            format(gString,SOS," %s Has a killing spree (6 kills) (Reward:600$ + 2 score)",GetName(killerid));
	            SendClientMessageToAll(GREEN, gString);
	            GivePlayerMoney(killerid, 600);
	            SetPlayerScore(killerid,GetPlayerScore(killerid)+2);
	            SendClientMessage(killerid, GREEN,"You recieved 600$ and +2 scores for your 6 spree!");
		    }
	        case 9:
	        {
	            format(gString,SOS," %s Has a killing spree (9 kills) (Reward:900$ + 2 score)",GetName(killerid));
	            SendClientMessageToAll(GREEN, gString);
				GivePlayerMoney(killerid, 900);
				SetPlayerScore(killerid,GetPlayerScore(killerid)+2);
				SendClientMessage(killerid, GREEN,"You recieved 900$ and +2 scores for your 9 spree!");
	        }
			case 12:
	        {
	            format(gString,SOS," %s Has a killing spree (12 kills) (Reward:1000$ + 4 score)",GetName(killerid));
	            SendClientMessageToAll(GREEN, gString);
	            SetPlayerScore(killerid,GetPlayerScore(killerid)+4);
	            GivePlayerMoney(killerid, 1000);
	            SendClientMessage(killerid, GREEN,"You recieved 1000$ and +4 scores for your 12 spree!");
			}
			case 15:
	        {
	            format(gString,SOS," %s Has a killing spree (15 kills) (Reward:2500$ + 4 score)",GetName(killerid));
	            SendClientMessageToAll(GREEN, gString);
	            SetPlayerScore(killerid,GetPlayerScore(killerid)+4);
	            GivePlayerMoney(killerid, 2500);
	            SendClientMessage(killerid, GREEN,"You recieved 2500$ and +4 scores for your 15 spree!");
			}
			case 20:
	        {
	            format(gString,SOS," %s Has a killing spree (20 kills) (Reward:3500$ + 4 score)",GetName(killerid));
	            SendClientMessageToAll(GREEN, gString);
	            SetPlayerScore(killerid,GetPlayerScore(killerid)+4);
	            GivePlayerMoney(killerid, 3500);
	            SendClientMessage(killerid, GREEN,"You recieved 3500$ and +4 scores for your 20 spree!");
			}
			case 25:
	        {
	            format(gString,SOS," %s Has a killing spree (25 kills) (Reward:4000$ + 4 score)",GetName(killerid));
	            SendClientMessageToAll(GREEN, gString);
	            SetPlayerScore(killerid,GetPlayerScore(killerid)+4);
	            GivePlayerMoney(killerid, 4000);
	            SendClientMessage(killerid, GREEN,"You recieved 4000$ and +4 scores for your 25 spree!");
			}
			case 30:
	        {
	            format(gString,SOS," %s Has a killing spree (30 kills) (Reward:4500$ + 4 score)",GetName(killerid));
	            SendClientMessageToAll(GREEN, gString);
	            SetPlayerScore(killerid,GetPlayerScore(killerid)+4);
	            GivePlayerMoney(killerid, 4500);
	            SendClientMessage(killerid, GREEN,"You recieved 4500$ and +4 scores for your 30 spree!");
			}
			case 35:
	        {
	            format(gString,SOS," %s Has a killing spree (35 kills) (Reward:5000$ + 5 score)",GetName(killerid));
	            SendClientMessageToAll(GREEN, gString);
	            SetPlayerScore(killerid,GetPlayerScore(killerid)+5);
	            GivePlayerMoney(killerid, 5000);
	            SendClientMessage(killerid, GREEN,"You recieved 5000$ and +5 scores for your 35 spree!");
			}
		}
Reply
#2

Quote:

Streaks[killerid] += 1;

Should not it be Streaks[killerid] ++; ?
Reply
#3

That's the same.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)