This library allows you to create zones where players can be shot directly at their skin.
Place the antilag.inc file in your /pawno/include/ directory:
#include <a_samp>
#include <antilag>-
SetPlayerAntiLag– Enable or disable the skinshoot feature for a specific player.Example 1 (Enable skinshoot):
SetPlayerAntiLag(playerid, true);
Example 2 (Disable skinshoot):
SetPlayerAntiLag(playerid, false);
-
IsPlayerAntiLag– Check if a player is currently in a skinshoot zone.Example 1 (Player is in a skinshoot zone):
if(IsPlayerAntiLag(playerid)) { print("The player is in a skinshoot zone"); }
Example 2 (Player is not in a skinshoot zone):
if(!IsPlayerAntiLag(playerid)) { print("The player is not in a skinshoot zone"); }
Here’s a complete example using the Pawn.CMD command processor:
#include <a_samp>
#include <antilag>
#include <Pawn.CMD>
public OnPlayerCommandReceived(playerid, cmd[], params[], flags)
{
if(IsPlayerAntiLag(playerid) && strcmp(cmd, "exitzone", true) != 0)
{
SendClientMessage(playerid, -1, "ERROR: You must use /exitzone to leave the skinshoot area.");
return 0;
}
return 1;
}
cmd:antilag(playerid)
{
if(IsPlayerAntiLag(playerid))
return SendClientMessage(playerid, -1, "ERROR: You are already in a skinshoot zone.");
SetPlayerAntiLag(playerid, true);
SendClientMessage(playerid, -1, "You have entered a skinshoot area.");
GivePlayerWeapon(playerid, 24, 500);
return 1;
}
cmd:exitzone(playerid)
{
if(!IsPlayerAntiLag(playerid))
return SendClientMessage(playerid, -1, "ERROR: You are not in a skinshoot zone.");
SetPlayerAntiLag(playerid, false);
SpawnPlayer(playerid);
return 1;
}- DevD4v3 – Main developer
- SA-MP Team