Anti Spawn Killing
#1

Hi all,
I made my first Include but i dont know if it work, because my server isnt workind (idk why)

This is the code:

Код:
#if defined _antisk_included
    #endinput
#endif
#define _antisk_included
#include <a_samp>
#include <a_players>
forward AntiSK(playerid, ,killerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
public AntiSK(playerid, killerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
 	new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY)
	{
		new string[128];
    	new name[MAX_PLAYER_NAME];
    	GetPlayerName(killerid, name, sizeof name);
        format(string, sizeof string, "%s has been kicked for spawn killing.",name);
        Kick(killerid);
		return 1;
    }
    return 0;
}
Then in the gamemode:

#include <AntiSK>

and in OnPlayerDeath(blabla):

AntiSK(playerid, killerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)

So the killer will be kicked, that will work good? or there is a bug?
Reply
#2

Quote:
Originally Posted by Xentiarox
Посмотреть сообщение
Try out the AntiSpawnKill feature provided by Gamer_Z's AntiCheatPlugin at http://gpb.******code.com/
1.- Thanks for answer
2.- Link Dont Work
3.- I want to know if THIS script work. i dont like to use 3rd person scripts
Reply
#3

I would probably work if they were at those coordinates.

The only problem is, if they were near the area and was killed, they would still be kicked.

I suggest making a timer and variable, set the variable to 1 or something when the timer starts, and if the player is killed, if the variable is 1, the killerid is kicked. After the timer is finished (make it like, 1-3 seconds maybe), it would reset the variable to 0 so the killerid will not be kicked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)