[HELP] Antihack -
NotoriousMOB - 11.11.2010
Here i go again... sry
I have made a Black Market with guns as Rocket Launcher and such you can buy
but.. may sound wierd but i wan't to allow a weapon to be used cause when a player tryes to by it the anti hack bans him for weapon hack
I been searching around now and i have no idea where the hell those Weap ID's are...
i wan't to allow some weapons so the bot don't ownde them.
Код:
GetPlayerWeaponData(i, 7, weaponid, ammo);
new pSpecialAction = GetPlayerSpecialAction(i);
if (weaponid > 1 || pSpecialAction == SPECIAL_ACTION_USEJETPACK)
{
// Illegal weapon
TogglePlayerControllable(i, 0);
SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: You have been banned due to suspected cheating.");
SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: Please contact an admin oon the forum if you feel this is in error.");
SendClientMessage(i, COLOR_RED, "iBot Anticheat 0.6 by Jofi");
//PlayerInfo[i][pLocked] = 1;
OnPlayerUpdate(i);
//GetPlayerIp(i, banip, sizeof(banip));
//BanAdd(4, PlayerInfo[i][pSQLID], banip, 38);
GetPlayerName(i, plname, sizeof(plname));
format(string, sizeof(string), "AdmCmd: %s was banned by [AntiHack]bot, reason: weapon hack", plname);
Ban(i);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Re: [HELP] Antihack -
cessil - 11.11.2010
well that code bans anyone with a weapon in the 7th slot which handles miniguns, rocket launchers and flamethrowers
GetPlayerWeaponData(playerid, slot, variable, variable);
Re: [HELP] Antihack -
(SF)Noobanatior - 11.11.2010
when they buy the gun set a value
pawn Код:
SetPVarInt(playeird,"HeavyWeapon",1);
then add a condition into the anti hack
pawn Код:
GetPlayerWeaponData(i, 7, weaponid, ammo);
new pSpecialAction = GetPlayerSpecialAction(i);
if (weaponid > 1 || pSpecialAction == SPECIAL_ACTION_USEJETPACK && !GetPVarInt(i,"HeavyWeapon")
{
// Illegal weapon
TogglePlayerControllable(i, 0);
SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: You have been banned due to suspected cheating.");
SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: Please contact an admin oon the forum if you feel this is in error.");
SendClientMessage(i, COLOR_RED, "iBot Anticheat 0.6 by Jofi");
//PlayerInfo[i][pLocked] = 1;
OnPlayerUpdate(i);
//GetPlayerIp(i, banip, sizeof(banip));
//BanAdd(4, PlayerInfo[i][pSQLID], banip, 38);
GetPlayerName(i, plname, sizeof(plname));
format(string, sizeof(string), "AdmCmd: %s was banned by [AntiHack]bot, reason: weapon hack", plname);
Ban(i);
SendClientMessageToAll(COLOR_LIGHTRED, string);
something like that
Re: [HELP] Antihack -
NotoriousMOB - 11.11.2010
So there's nothing i can do about it then changing the antihack ?
because of the category 7
or what do you suggest i can do.
Re: [HELP] Antihack -
(SF)Noobanatior - 11.11.2010
as above
Re: [HELP] Antihack -
NotoriousMOB - 11.11.2010
Okay have the :
Код:
if (weaponid > 1 || pSpecialAction == SPECIAL_ACTION_USEJETPACK && !GetPVarInt(i,"HeavyWeapon"))
and putted this down at when you buy the gun
Код:
SetPVarInt(playerid,"RPG",35);
am i wrong on this?
Re: [HELP] Antihack -
(SF)Noobanatior - 11.11.2010
it dont matter what weppon it is just have to be the same so just use
pawn Код:
SetPVarInt(playeird,"HeavyWeapon",1);
and that code should work
Re: [HELP] Antihack -
NotoriousMOB - 11.11.2010
Damn that's really annoying changed it like you said
but still player gets banned for buying the RocketLauncher.
Re: [HELP] Antihack -
(SF)Noobanatior - 11.11.2010
try it like this
pawn Код:
if (weaponid > 1 || pSpecialAction == SPECIAL_ACTION_USEJETPACK)
{
if(!GetPVarInt(i,"HeavyWeapon")){
// Illegal weapon
TogglePlayerControllable(i, 0);
SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: You have been banned due to suspected cheating.");
SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: Please contact an admin oon the forum if you feel this is in error.");
SendClientMessage(i, COLOR_RED, "iBot Anticheat 0.6 by Jofi");
//PlayerInfo[i][pLocked] = 1;
OnPlayerUpdate(i);
//GetPlayerIp(i, banip, sizeof(banip));
//BanAdd(4, PlayerInfo[i][pSQLID], banip, 38);
GetPlayerName(i, plname, sizeof(plname));
format(string, sizeof(string), "AdmCmd: %s was banned by [AntiHack]bot, reason: weapon hack", plname);
Ban(i);
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
}
Re: [HELP] Antihack -
NotoriousMOB - 11.11.2010
Sorry again but not working this way give's me the SafePlayerPoint errors.
i was thinking about
chaning the :
Код:
GetPlayerWeaponData(i, 7, weaponid, ammo);
And making these:
Код:
{
if(GetPlayerWeapon(killerid) == 38) Ban(killerid); //Ban if they have a minigun
return 1;
}
if(GetPlayerWeapon(killerid) == 37) Ban(killerid); //Ban if they have a Flame-thrower
return 1;
}
But well i don't know don't understand why it wont work.