Vice City: Multiplayer

Server Development => Scripting and Server Management => Snippet Showroom => Topic started by: KAKAN on May 09, 2016, 05:47 AM

Title: Simple spree system
Post by: KAKAN on May 09, 2016, 05:47 AM
Someone PM'ed me to give him a spree system, so I thought to create this and share it with all of yo.
Here's the code:
http://pastebin.com/7TsH8izAI haven't tested it yet, if someone can test it, it would be good for me :)
It can still be improved, but I thought to keep it as simple as I can :D
Title: Re: Simple spree system
Post by: Xmair on May 09, 2016, 09:32 AM
You should actually test it first since bugs can occur from any place.
Title: Re: Simple spree system
Post by: KAKAN on May 09, 2016, 10:58 AM
Quote from: Xmair on May 09, 2016, 09:32 AMYou should actually test it first since bugs can occur from any place.
Okay, tested. Added /spree command. Working.
If you still find bugs, report it here.
Title: Re: Simple spree system
Post by: Cool on May 09, 2016, 03:40 PM
INC does not exists everything putting in right place but error coming onplayerkill
Title: Re: Simple spree system
Post by: Thijn on May 09, 2016, 04:09 PM
Then you probably didn't copy paste it correctly.
Title: Re: Simple spree system
Post by: KAKAN on May 09, 2016, 04:17 PM
Quote from: Hercules on May 09, 2016, 03:40 PMINC does not exists everything putting in right place but error coming onplayerkill
Maybe you forgot the onPlayerJoin?
Title: Re: Simple spree system
Post by: KAKAN on May 09, 2016, 04:23 PM
Forgot another parameter in onPlayerPart, added it. Report if you find any new bugs.
Title: Re: Simple spree system
Post by: Cool on May 11, 2016, 03:14 PM
@KAKAN i have found an nice bug for players see if a player kill 3 player and in medium he died and after death he kill more 2 players so he will got spree please fix it
Title: Re: Simple spree system
Post by: KAKAN on May 11, 2016, 05:36 PM
Quote from: Hercules on May 11, 2016, 03:14 PM@KAKAN i have found an nice bug for players see if a player kill 3 player and in medium he died and after death he kill more 2 players so he will got spree please fix it
Was busy with doing some other things, thanks for pointing it out. It was a 1 line fix, so, fixed.
Title: Re: Simple spree system
Post by: Cool on May 12, 2016, 06:52 AM
Now its working fine thanks you done it in very simple method no spam nice :D
Title: Re: Simple spree system
Post by: Derwaish. on Jun 04, 2017, 03:38 AM
@KAKAN I found a bug in your script. The victim is on killing spree while killer is not and when victim killed Killer he end his own spree. lol
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fu8SxklS.png&hash=2bea6dffac949e3281d3468ea9bd8126b345e22b)
Title: Re: Simple spree system
Post by: KAKAN on Jun 04, 2017, 06:00 AM
Quote from: R on Jun 04, 2017, 03:38 AM@KAKAN I found a bug in your script. The victim is on killing spree while killer is not and when victim killed Killer he end his own spree. lol
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fu8SxklS.png&hash=2bea6dffac949e3281d3468ea9bd8126b345e22b)

Quote from: Thijn on May 09, 2016, 04:09 PMThen you probably didn't copy paste it correctly.
Title: Re: Simple spree system
Post by: SAzEe21 on Jun 04, 2017, 06:13 AM
may be your onPlayerKill function fault, post your onplayerkill here.
Title: Re: Simple spree system
Post by: Derwaish. on Jun 04, 2017, 06:21 AM
Quote from: Zeeshan.Bhatti on Jun 04, 2017, 06:13 AMmay be your onPlayerKill function fault, post your onplayerkill here.



 spree[ killer.ID ].Inc();
    spree[ player.ID ].End( killer );
Copied from Given link
Quote from: KAKAN on Jun 04, 2017, 06:00 AM
Quote from: R on Jun 04, 2017, 03:38 AM@KAKAN I found a bug in your script. The victim is on killing spree while killer is not and when victim killed Killer he end his own spree. lol
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fu8SxklS.png&hash=2bea6dffac949e3281d3468ea9bd8126b345e22b)

Quote from: Thijn on May 09, 2016, 04:09 PMThen you probably didn't copy paste it correctly.

Hmm. Let me try again in Blank Server.

Title: Re: Simple spree system
Post by: Xmair on Jun 04, 2017, 07:13 AM
You probably have killer as the person who is killed and the killed person as killer.
Title: Re: Simple spree system
Post by: KAKAN on Jun 04, 2017, 07:29 AM
This thing has no bugs in it, especially not like that one. If you find any, PM me on the forum.
All I can say that you've messed up real good. The ADM script does that. So, see your function before telling that its a "bug".
I'm locking this topic. And, if you have any bugs with it, read this:-
Quote from: Thijn on May 09, 2016, 04:09 PMThen you probably didn't copy paste it correctly.