[Tutorial] [TUT] Making your own Killing Sprees. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (
https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] [TUT] Making your own Killing Sprees. (
/showthread.php?tid=155885)
[TUT] Making your own Killing Sprees. -
Brian_G - 20.06.2010
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!
Re: [TUT] Making your own Killing Sprees. -
jurgen - 20.06.2010
great!
Re: [TUT] Making your own Killing Sprees. -
Brian_G - 20.06.2010
Quote:
Originally Posted by _X_
great!
|
Thanks
Re: [TUT] Making your own Killing Sprees. -
Lorenc_ - 20.06.2010
nice
Re: [TUT] Making your own Killing Sprees. -
Brian_G - 20.06.2010
Quote:
Originally Posted by » Lorenc « (back)
nice 
|
Thanks
Re: [TUT] Making your own Killing Sprees. -
park4bmx - 20.06.2010
Nice TUT
Re: [TUT] Making your own Killing Sprees. -
Woet - 20.06.2010
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.
Re: [TUT] Making your own Killing Sprees. -
Brian_G - 20.06.2010
Quote:
Originally Posted by park4bmx
Nice TUT
|
Thanks
Re: [TUT] Making your own Killing Sprees. - [03]Garsino - 20.06.2010
You just stole this from a released filterscript and cut out some code, renamed it to a "tutorial" claiming it as your own, gg.
Re: [TUT] Making your own Killing Sprees. -
Brian_G - 20.06.2010
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.