Spawnkill = Dead -
Blackazur - 21.12.2013
Hello, how to make that when someone spawnkill that he get killed automatic?
Re: Spawnkill = Dead -
Konstantinos - 21.12.2013
Make an area using Incognito's Streamer and in OnPlayerDeath if the killerid is a valid player and the playerid is in that area, kill the killerid.
Re: Spawnkill = Dead -
CutX - 21.12.2013
get a timestamp for each player who spawns,
like this:
global var for players:
sktime[MAX_PLAYERS]=0;
in onplayerspawn:
sktime[playerid] = gettime();
now in onplayertakedamage:
if(gettime() - sktime[playerid] < 60) return // 60 = 1 min. Here do something to the issuerid
that'd be 1 min anti spawnkill in this example
btw. this method using gettime will only work until January 19, 2038
AW: Spawnkill = Dead -
Blackazur - 21.12.2013
No i just want that when he shot at the spawn players that he get automatic killed. how to do this?
Re: Spawnkill = Dead -
CutX - 21.12.2013
oh, okey.
we could do this the easy way,
just take the coords of your spawnpoint, for example 1234.1,1234.1,1234.2
and now in onplayertakedamage:
if(IsPlayerInRangeOfPoint(playerid, 10.0,1234.1, 1234.1, 1234.2)) SetPlayerHealth(issuerid,0.0);
Re: Spawnkill = Dead -
MBilal - 21.12.2013
no need to kill just add spawn killl system No budy can do spawnkill
Код:
Public OnPlayerSpawn(Playerid)
{
SetPlayerHealth(playerid, 99999.0);
SetTimerEx("SpawnProtection", 10000, false, "i", playerid);
SendClientMessage(playerid, COLOR_GREEN, "Anti Spawn Kill Started.");
}
public SpawnProtection(playerid)//Our Function we made.
{//Open Braket 4
SetPlayerHealth(playerid, 100.0);// Setting the player a Normal Health. 100 change it to what you want.
SendClientMessage(playerid, COLOR_RED, "Anti Spawn Kill Ended.");
return 1;// Returning to True
}//Open Braket 4
AW: Spawnkill = Dead -
Blackazur - 21.12.2013
no i already had such a system and this sucks.
Re: Spawnkill = Dead -
SilentSoul - 21.12.2013
Not tested but that should work
pawn Код:
new Protected[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
Protected[playerid] = 1;
SetTimer("Endprotect",3000,false);//change 3000 to the protect time you want
return 1;
}
forward Endprotect(playerid);
public Endprotect(playerid)
{
Protected[playerid] = 0;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(Protected[playerid] == 1)
{
SetPlayerHealth(killerid,0);
}
return 1;
}
Re: Spawnkill = Dead -
NinjaWarrior - 21.12.2013
Код:
Antispawnkill(playerid); //put on onplayerspawn
stock Antispawnkill(playerid) //put on the bottom of the script
{
new spawnkill;
{
SetPlayerHealth(playerid,99999);
SendClientMessage(playerid, 0x00FF00AA, "You are now protected by anti spawn-kill!");
SetTimerEx("StopAntiSpawnKill",5000,0,"i",playerid);
}
return spawnkill;
}
forward StopAntiSpawnKill(playerid);
public StopAntiSpawnKill(playerid)
{
SetPlayerHealth(playerid,100);
SendClientMessage(playerid, 0xFF0000AA, "Spawn kill protection is now over!");
return 1;
}