11.07.2012, 06:37
Hello guys , i wanted to edit ammunition armor to 99 instead of 100
Question is , what are the functions needed for this?
Thanks!
Question is , what are the functions needed for this?
Thanks!
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
new pArmour[MAX_PLAYERS];
public OnGameModeInit() //Or OnFilterScriptInit()
{
SetTimer("ArmourCheck", 2000, true);
return 1;
}
public OnPlayerConnect(playerid)
{
SetPlayerArmour(playerid, 0);
pArmour[playerid] = 0;
return 1;
}
forward ArmourCheck();
public ArmourCheck()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new Float:Armour;
GetPlayerArmour(i, Armour);
if(pArmour[i] < Armour)
{
if(!IsPlayerInRangeOfPoint(i, 30, 286.148987, -40.644398, 1001.569946) && GetPlayerInterior(i) != 1 || !IsPlayerInRangeOfPoint(i, 30, 286.800995, -82.547600, 1001.539978) && GetPlayerInterior(i) != 4||
!IsPlayerInRangeOfPoint(i, 30, 296.919983, -108.071999, 1001.569946)&& GetPlayerInterior(i) != 6|| !IsPlayerInRangeOfPoint(i, 30, 314.820984, -141.431992, 999.661987) && GetPlayerInterior(i) != 7||
!IsPlayerInRangeOfPoint(i, 30, 316.820984, -167.706985, 999.661987) && GetPlayerInterior(i) != 6)
{
SendClientMessage(i, 0xFF0000AA, "You have been banned from this server. Reason: Armour Hacks");
Ban(i);
return 1;
}
else return pArmour[i] = Armour;
}
}
}
return 1;
}