Anti-Spawnkill [fixed up]

Started by wilber32, Dec 11, 2015, 11:31 PM

Previous topic - Next topic

wilber32

Hello scripts of VCMP-0.4, Today I will show my spawn kill  [Caveat] No is copy! It is modified follow my steps

PlayerClass
{
AntiSP = false;
}

function onPlayerSpawn( player )
{
SP( player );
}

function onPlayerKill( player, killer, reason, bodypart )
{
 if ( stats[player.ID].AntiSP = true )
 {
  player.Health = 0;
  Message( "++ Auto-kill:[ " + player.Name + " ]. Reason:[ Spawn-Kill ]" );
 }
}

Functions

function SP( player )
{
 stats[player.ID].AntiSP = true;
  MessagePlayer( "Spawnkil [ON]", player );
 NewTimer( "SPoff", 5000, 1, player.ID );
}

function SPoff( player )
{
local player = FindPlayer(player);
if(player){
 stats[player.ID].AntiSP = false;
 MessagePlayer( "Spawnkil [OFF]", player );
}
}

credits by  [NxR]Wilber32.


MatheuS

This script looks a lot like what Lucas created.

Link Here.

But good job for posting. ;)
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

KAKAN

Quote from: MatheuS on Dec 11, 2015, 11:49 PMThis script looks a lot like what Lucas created.

Link Here.

But good job for posting. ;)
I don't even know what he "fixed up" and didn't even gave credits to Lucas
oh no

wilber32


KAKAN

Quote from: wilber32 on Dec 12, 2015, 03:10 AMI only did this system
You didn't even made the "whole" system.
How can you use the array stats for the class PlayerStats?
oh no

Thijn

And why do people keep using Timers for such things...

wilber32

if you're so scrit modifies this Thijn

Thijn

Quote from: wilber32 on Dec 12, 2015, 08:20 PMif you're so scrit modifies this Thijn
There's been scripts posted that do this without a timer. Search for it.

wilber32


KAKAN

1st of all we can't do everything for you, we're not your servants.
Quote from: wilber32 on Dec 13, 2015, 04:24 AMgive me link
Still then, http://forum.vc-mp.org/?topic=1871.0
oh no

wilber32

That did not work for me kakán

KAKAN

Quote from: wilber32 on Dec 13, 2015, 05:33 AMThat did not work for me kakán
Your system didn't work for me, @wilber32
oh no

wilber32

You should fit your script

KAKAN

Quote from: wilber32 on Dec 13, 2015, 03:32 PMYou should fit your script
According to you: I have my script "fit" please help me!
The script without timer works for me, but yours one doesn't works

Sorry for fighting :P
oh no

wilber32

You're smart, When the timer is ON , He killed the player and appears spawnkill, But as time passes employee He killed the player and appears spawnkill.
I noticed after -.-! that bug