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..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;
}
|
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 |