Jump to content
  • 0

Anti Free Kill


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

Hello friends, I would like a simple script to avoid the free kill.
If a player kills the same more than 30
 times without dying, a global message would appear with the nicknames and both would go to jail for 1 hour.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

I recommend to fuse this with another OnPCKillEvent to avoid having a large event queue.

-	script	Anti_FreeKill	-1,{

OnPCKillEvent:

	if(@last_kill == killedrid) {
		if(++@last_killamt >= 29) {
			atcommand "@jailfor 1h "+strcharinfo(0);
			announce strcharinfo(0)+" has been cheating with "+rid2name(@last_kill)+".",bc_all;
			@last_killamt = 0;
			@last_kill = 0;
			end;
		}
	} else {
		@last_killamt = 0;
	}
	@last_kill = killedrid;
	end;

OnPCDieEvent:

	@last_killamt = 0;
	end;

}

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

46 minutes ago, n0tttt said:

I recommend to fuse this with another OnPCKillEvent to avoid having a large event queue.


-	script	Anti_FreeKill	-1,{

OnPCKillEvent:

	if(@last_kill == killedrid) {
		if(++@last_killamt >= 29) {
			atcommand "@jailfor 1h "+strcharinfo(0);
			announce strcharinfo(0)+" has been cheating with "+rid2name(@last_kill)+".",bc_all;
			@last_killamt = 0;
			@last_kill = 0;
			end;
		}
	} else {
		@last_killamt = 0;
	}
	@last_kill = killedrid;
	end;

OnPCDieEvent:

	@last_killamt = 0;
	end;

}

 

 

best scripter! Thank you very much, it worked exactly as I wanted it to. :meow:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...