About 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: About Weapon Hack (
/showthread.php?tid=608523)
About Weapon Hack[SOLVED] -
ProRakNet - 02.06.2016
Hi, guys !
About an issue, i'd like to ask your permission:
How can i do anti weapon hack (detect)
- So for example:
/weapon command: minigun weapon > Not Hack.
Cleo weapon hack: minigun weapon > Hack Detect and Kick !
Re: About Weapon Hack -
ProRakNet - 02.06.2016
Up !
Re: About Weapon Hack -
F1N4L - 02.06.2016
To check:
SetTimer/
Ex
or
CallBack
OnPlayerUpdate
To permission:
IsPlayerAdmin
or
Your admin variable
To weapons:
Weapons
Re: About Weapon Hack -
Sjn - 02.06.2016
Create a server sided weapon giving function. Assign a variable (true/1) to the given weapon ID to indicate that it is server sided. And inside a timer function, check if a player has some weapons but the variable is still (false/0) which means the weapons are not server sided, then ban the player.
I am using this method for a quiet while and it's effective.
Re: About Weapon Hack -
ProRakNet - 02.06.2016
Working, thanks solved.
- For SetTimer performance loss:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE)){
new weap = GetPlayerWeapon(playerid);
if(weap > 1 && weap != 46 && Weapon[playerid][weap] == false)
{
/* Kick or Ban and message. */
}}
return 1;
}
Re: About Weapon Hack -
oMa37 - 02.06.2016
Quote:
Originally Posted by ProRakNet
Working, thanks solved.
- For SetTimer performance loss:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE)){
new weap = GetPlayerWeapon(playerid);
if(weap > 1 && weap != 46 && Weapon[playerid][weap] == false)
{
/* Kick or Ban and message. */
}}
return 1;
}
|
Why you color the code? xD
use [php] instead if you want some colors lol :P
Re: About Weapon Hack -
ProRakNet - 02.06.2016
Quote:
Originally Posted by oMa37
Why you color the code? xD
use [php] instead if you want some colors lol :P
|
yes, big fail.. but this is more sexy
Re: About Weapon Hack -
MBilal - 02.06.2016
Код:
public GivePlayerWeaponEx(playerid,weaponid,ammo)
{
Weapon[playerid][weaponid] = true;
return GivePlayerWeapon(playerid,weaponid,ammo);
}
Kindly Explain but to use that You need to change all GivePlayerWeapon in game to GivePlayerWeaponEx