08.02.2015, 16:07
I made this anti ammo hack
It didn't work and didn't print the word.
Please Help
REP+++++
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(HOLDING(KEY_FIRE))
{
bAmmo[playerid] = GetPlayerAmmo(playerid);
bWeapon[playerid] = GetPlayerWeapon(playerid);
if(GetPlayerWeapon(playerid) < 16 || GetPlayerWeapon(playerid) == 19 || GetPlayerWeapon(playerid) == 20 || GetPlayerWeapon(playerid) == 21 || GetPlayerWeapon(playerid) > 38) return 0;
for(new i = 0; i < 7;i++)
{
nAmmo[playerid] = GetPlayerAmmo(playerid);
nWeapon[playerid] = GetPlayerWeapon(playerid);
}
if(bAmmo[playerid] == nAmmo[playerid] && bWeapon[playerid] == nWeapon[playerid])
{
new string[128];
new name[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
format(string,sizeof(string),"%s has banned for ammo hack",name);
SendClientMessageToAll(0xAA3333AA,string);
SetTimerEx("ban",500,false,"i",playerid);
SendClientMessage(playerid, 0xAA3333AA,"You have banned from the server ");
printf("Cheat Detect");
#pragma unused string1
}
}
return 1;
}
forward ban(playerid);
public ban(playerid)
{
BanEx(playerid, "Ammo Hack");
return 1;
}
Please Help
REP+++++