SA-MP Forums Archive
problem with anti cheat gun - 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: problem with anti cheat gun (/showthread.php?tid=462493)



problem with anti cheat gun - omidi - 07.09.2013

so i copied an anti weapohn hack , it works good ( when hacker bring a gun and use it in his hands it will detect him )
and it have complete server side weapon

Код:
stock ServerWeapon(playerid,weaponid,ammo)
{
    PlayerWeapons[playerid][weaponid]=true; // Player Has the weapon.
    GivePlayerWeapon(playerid,weaponid,ammo); // To realy give him the weapon.
}
i have an saveing weapon system (works good)

but my problem is

so when a cheater enable a gun but he dont bring it in his hands and he relog , and then he come back the cheat weapon was saved by saveing weapon system

onPlayerDisconnect

i have this
Код:
GetPlayerWeaponData(playerid, 1, WeaponInfo[playerid][Weapon1], WeaponInfo[playerid][Ammo1]);
is there anyway that you save real gun witch server gave to the player ?


Re: problem with anti cheat gun - Konstantinos - 07.09.2013

Using GetPlayerWeaponData will give you the weapon the player has in each slot (included the weapons from cheats).

It's better to loop through the weapons you've stored (for the server-side weapons).