23.07.2012, 02:21
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:
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?
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; }
#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?