Anti weapon hack - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Anti weapon hack (
/showthread.php?tid=478703)
Anti weapon hack -
Lajko1 - 30.11.2013
Hey guys
I want to make my own anti weapon hack, for start I searched a bit but there are only simple hack to ban players with minigun, granades and so on... than I saw few really complicated scripts that I don't like.. so I decided to make my own anti weapon hack system.. so what I want to make is.. there are shops where I can buy weapons (few locations with pickups and there is possible to write /buygun to buy weapon) so I want to detect if player buy weapon there will be all cool, if he didn't bought it he will be kicked / banned from server..
this is what I tried - I tried with commands cuz I didn't create pickups yet it should be same effect:
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerWeapon(playerid) == 1 && Check[playerid] == 0 || GetPlayerWeapon(playerid) == 2 && Check[playerid] == 0 || GetPlayerWeapon(playerid) == 5 || GetPlayerWeapon(playerid) == 6 || GetPlayerWeapon(playerid) == 7 || GetPlayerWeapon(playerid) == 8 || GetPlayerWeapon(playerid) == 10 || GetPlayerWeapon(playerid) == 11 || GetPlayerWeapon(playerid) == 12 || GetPlayerWeapon(playerid) == 13 ) //Put here the IDs of weapons you want, I'll post link after pawn.
{
ResetPlayerWeapons(playerid);
SendClientMessage(playerid,-1,"Hacking");
return 1;
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/weap", true))
{
GivePlayerWeapon(playerid, 1,1);
Check[playerid] = 1;
SetTimerEx("Check1", 2000, false, "i", playerid);
return 1;
}
if(!strcmp(cmdtext, "/weapa", true))
{
GivePlayerWeapon(playerid, 2,1);
return 1;
}
return 0;
}
public Check1(playerid)
{
Check[playerid] = 0;
return 1;
}
public OnPlayerConnect(playerid)
{
Check[playerid] = 0;
return 1;
}
The problem is when It resets the veriable it auto resets my weapons (I figured out why but I don't know how to change it so it can work ^^) .. and so on, can someone explain me a bit how can I make it and give me some tips maybe example? Thank you very much in advance
Re: Anti weapon hack -
cessil - 30.11.2013
tips
https://sampforum.blast.hk/showthread.php?tid=220089
Re: Anti weapon hack -
Pottus - 30.11.2013
I think you need to update the player timeout code there cessil you shouldn't have to reload the ban list anymore Slice recently pointed this out to me.
Re: Anti weapon hack -
Deduction - 01.12.2013
Did you check my anti weapon hack?
It is confusing, but it does the job. If you know how to use it.
And I can always assist you if needed.
Link:
https://sampforum.blast.hk/showthread.php?tid=319800
Re: Anti weapon hack -
cessil - 01.12.2013
Quote:
Originally Posted by Deduction
|
that has misleading information and... well messy script, it would also detect a lot of false positive due to not considering lag
Re: Anti weapon hack -
Lajko1 - 01.12.2013
Thank you for responds I will try to script it, if I will have problems I will let you know