Is there a way?
#1

Question : Is there a way to get the
players kill in a row??

Example :
3 kills = 1 wanted level and $1000
Reply
#2

Yes
Reply
#3

Quote:
Originally Posted by Killa_
Yes
lol okay how?? because I'm confused
with these sort of things
Reply
#4

pawn Код:
public OnPlayerDeath(playerid,killerid)
{
  kills[killerid]++;
  kills[playerid] = 0;
 
  if(kills[killerid] == 3)
    GivePlayerMoney(killerid,1000);
  return 1;
}
If a player kills another player, he gets +1 to his kills and the player that died, gets his/her kills set to 0. If the killer has 3 kills, do what you want.
Reply
#5

idk if this work
Код:
new KILLS[MAX_PLAYERS] = 0
public OnPlayerDeath(playerid, killerid, reason)
{
	KILLS[killerid] = KILLS[killerid] + 1;
	KILLS[playerid] = 0;
	if (KILLS[killerid] == 1)
	{
	  //code
	  return 1;
 	}
	if (KILLS[killerid] == 2)
	{
	  //code
	  return 1;
 	}
 	if (KILLS[killerid] == 3)
 	{
 	  //code
		return 1;
	}
	if (KILLS[killerid] == 4)
	{
	  //code
	  return 1;
 	}
 	return 1;
}
Reply
#6

Okay, okay, I'll try these codes
Reply
#7

pawn Код:
new Kills[MAX_PLAYERS];

public OnPlayerDeath(playerid,killerid,reason)
{
  if(killerid != INVALID_PLAYER_ID)
  {
     Kills[killerid]++;
     if(playerid != INVALID_PLAYER_ID) Kills[playerid] = 0;
     switch(Kills[killerid])
     {
       case 3: //Stuff here
       case 4:
       case 5:
       //etc
     }
  }
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: