Author Topic: Anti-Spawn Killing [ Full By me ] [ Tested ]  (Read 2736 times)

0 Members and 1 Guest are viewing this topic.

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Anti-Spawn Killing [ Full By me ] [ Tested ]
« on: December 09, 2013, 12:05:17 pm »
On The Top

Code: [Select]
new AntiSpawn[MAX_PLAYERS];
On The Spawn

Code: [Select]
AntiSpawn[playerid] = 1;
SetTimer("SpawnKilling", 5000, 0);
GameTextForPlayer(playerid," Spawn Protection ");

On OnPlayerDeath

Code: [Select]
if (AntiSpawn[playerid] == 1) {
SetPlayerHealth(killerid, 0);
SendClientMessage(killerid, COLOR_RED, " [Auto-Kill] Reason SpawnKilling ");
}

Now The Public

Code: [Select]
public SpawnKilling() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
       if(AntiSpawn[i] == 1) {
           SendClientMessage(i,COLOR_YELLOW,"Spawn Protection Offline!!");
AntiSpawn[i] = 0;
      }
  }
  }
return 1;
}

SaW A BuGG RePoRt It NoW

Credits All By Me

Please Rate It!
Out Of 10





My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline Doom

  • Made Man
  • ***
  • Posts: 105
    • View Profile
Re: Anti-Spawn Killing [ Full By me ] [ Tested ]
« Reply #1 on: December 09, 2013, 02:28:08 pm »
Still fail because if a player spawns he gets AntiSpawn = 1 and timer starts then after 2 secs another player spawns and gets AntiSpawn = 1 so after the Spawn Killing public runs it gets all the players with AntiSpawn == 1 and sets it to 0 which results the 2nd player get AntiSpawn-kill protection get turned off faster.

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Anti-Spawn Killing [ Full By me ] [ Tested ]
« Reply #2 on: December 09, 2013, 08:02:49 pm »
As a result, you're getting a code that doesnt work like it definitely should, increased use of CPU memory and laggs. But most of those who build their GUPS-based gamemodes using these codes don't get an average count of 3 - 5 players online. And yeah, don't write every word with a big letter, it aboves grammar and annoys, as I guess, many of users, including me, although my opinion isn't that important.


-Funniest quotes-

Quote from: asad3man
i cant able to understand