How anti sk dont work?
#1

There is code, why its didn't work. I think i made everything fine.
Code:
	if(IsPlayerInRangeOfPoint(killerid,2.0,Map[ZombieSpawnX],Map[ZombieSpawnY],Map[ZombieSpawnZ]) || IsPlayerInRangeOfPoint(killerid,2.0,Map[ZombieSpawn2X],Map[ZombieSpawn2Y],Map[ZombieSpawn2Z]))
	{
	SetPlayerHealth(killerid, 0); // my punishment for the Spawn Killer is Death.
    new zmstring2[256],pNames[MAX_PLAYER_NAME];
    GetPlayerName(killerid,pNames,sizeof(pNames));
    format(zmstring2,sizeof(zmstring2),""COL_LIGHTBLUE">> %s has been killed for spawn killing.",pNames);
    SendClientMessageToAll(-1,zmstring2);
    }
Reply
#2

I never used 'RangeOfPoint' but here's how i'd do it:

Top of the code:
Code:
new AntiSK[MAX_PLAYERS];
OnPlayerConnect
Code:
AntiSK[playerid] = 0;
OnPlayerSpawn
Code:
AntiSK[playerid] = 1;
SetTimerEx("AntiSpawnKill",5000,false,"d",playerid);
Code:
public AntiSpawnKill(playerid)
{
AntiSK[playerid] = 0;
}
OnPlayerTakeDamage
Code:
if(AntiSK[playerid] == 1) SetPlayerHealth(issuerid, 0);
That should work just fine
Reply
#3

Quote:
Originally Posted by Flamehaze7
View Post
I never used 'RangeOfPoint' but here's how i'd do it:

Top of the code:
Code:
new AntiSK[MAX_PLAYERS];
OnPlayerConnect
Code:
AntiSK[playerid] = 0;
OnPlayerSpawn
Code:
AntiSK[playerid] = 1;
SetTimerEx("AntiSpawnKill",5000,false,"d",playerid);
Code:
public AntiSpawnKill(playerid)
{
AntiSK[playerid] = 0;
}
OnPlayerTakeDamage
Code:
if(AntiSK[playerid] == 1) SetPlayerHealth(issuerid, 0);
That should work just fine
Ok thanks i will do how you said, bat maybe you can explain why "RangeOfPoint" are bad?
Reply
#4

Quote:
Originally Posted by Pokemon64
View Post
Ok thanks i will do how you said, bat maybe you can explain why "RangeOfPoint" are bad?
It's not bad at all, although the way you wanted to use it was not fit for it, as if the player who dies run to the spawn point even 5 min after spawning, it'd take it as a spawn kill aswell.

(also, i think the reason it does not work is because 2.0 for range is too small)

FlameHaze7's way is better.
Reply
#5

Quote:
Originally Posted by Pokemon64
View Post
Ok thanks i will do how you said, bat maybe you can explain why "RangeOfPoint" are bad?
I never said RoP is bad, it's just that it doesn't make much sense to kill people that go in that zone in my opinion (I don't know how's your script)
Reply
#6

Quote:
Originally Posted by Flamehaze7
View Post
I never said RoP is bad, it's just that it doesn't make much sense to kill people that go in that zone in my opinion (I don't know how's your script)
Well okay thanks for information. I will test it and let you know how it work.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)