[Tutorial] [TUT] Making your own Killing Sprees.
#1

First:

Place this on top of your script:

Код:
new KillingSpree[MAX_PLAYERS];
Second:

Place this under OnPlayerDeath Callback :

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
 KillingSpree[killerid] ++; // Means that the killer will get 1 kills
 KillingSpree[playerid] = 0; // Means that the player who died his killing spree will be restored to 0.

 if(KillingSpree[killerid] == 3) // It finds if the player is on a Killing Spree of 3 kills , you may change
 {
  // If you want to give the player that has 3 killing spree a reward do something here 
 }
 return 1;
}

And your done!
Reply
#2

great!
Reply
#3

Quote:
Originally Posted by _X_
great!
Thanks
Reply
#4

nice
Reply
#5

Quote:
Originally Posted by » Lorenc « (back)
nice
Thanks
Reply
#6

Nice TUT
Reply
#7

How is this a tutorial? A tutorial explains things, this is just 'place this code here and act like you understand it'
It doesn't really match a filterscript either because it's not written as one and it's way too simple.
Reply
#8

Quote:
Originally Posted by park4bmx
Nice TUT
Thanks
Reply
#9

You just stole this from a released filterscript and cut out some code, renamed it to a "tutorial" claiming it as your own, gg.
Reply
#10

Quote:
Originally Posted by Woet
How is this a tutorial? A tutorial explains things, this is just 'place this code here and act like you understand it'
It doesn't really match a filterscript either because it's not written as one and it's way too simple.
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
 KillingSpree[killerid] ++; // Means that the killer will get 1 kills
 KillingSpree[playerid] = 0; // Means that the player who died his killing spree will be restored to 0.

 if(KillingSpree[killerid] == 3) // It finds if the player is on a Killing Spree of 3 kills , you may change
 {
  // If you want to give the player that has 3 killing spree a reward do something here 
 }
 return 1;
}
Am just a beginner Woet , i explained what each thing means in the code , and i guessed it helped some .

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)