A Little Help Please
#1

I am having an issue on my server where players constantly DM regardless of what the sdmins say, they just keep doing it. The admins do not want to just be all ban crazy and dicks but I was wondering if I could make a sort of check to see if a player kills 5 people within a 3 minute period they will be kicked and receive a message like **You have been kicked for constant DM. This is not a DM server, if you want to DM take yourself to another server.** I know that this will require a timer and everything, but I do not know how I would set this all up so help is appreciated. Thanks in advance!
Reply
#2

pawn Код:
// Top Of Script
new KillsTimer;
new Kills[MAX_PLAYERS];
// OnGameModeInit
KillsTimer = SetTimer("ResetKills", 180 000, 1);
// OnGameModeExit
KillTimer(KillsTimer);
// OnPlayerDeath
Kills[killerid]++;
if(Kills[killerid] == 5)
{
  SendClientMessage(killerid, COLOR_RED, "GTFO");
  TogglePlayerControllable(killerid, 0);
  Kick(killerid);
}
// Bottom Of Script
public ResetKills()
{
  for(new i; i < MAX_PLAYERS; i++)
  {
    Kills[i] = 0;
  }
  return 1;
}
Try that, Not tested but should work
Reply
#3

TogglePlayerControllable(killerid, 0);

Bit random?
Reply
#4

Quote:
Originally Posted by Mikep
TogglePlayerControllable(killerid, 0);

Bit random?
So they cant have fun running around after they have been kicked lol
Reply
#5

Oh right, nice idea. *evil laugh*
Reply
#6

Kick ass thanks I will implement it then post any errors, but it looks pretty good to me thanks again guys!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)