Weapon hack
#2

i dont recommand to use onplayerkeystatechange

listen carfuly

dont give weapons by GivePlayerWeapon, Create a stock GiveWeapon
int the stock save the weapons data like this:
Quote:

stock GiveWeapon(playerid,weapon,ammo)
{
format(str,10,"weap%d",weapon);
SetPVarInt(playerid,str,1);
format(str,10,"wslot%d",GetWeaponSlot(weapon));
SetPVarInt(playerid,str,weapon);
format(str,10,"weapammu%d",weapon);
SetPVarInt(playerid,str,ammo);
format(str,10,"weapammumax%d",weapon);
SetPVarInt(playerid,str,ammo);
GivePlayerWeapon(playerid,weapon,ammo);
}

than go to OnPlayerWeaponShot and check if have the weapon that he shoot with like this:
Quote:

new store[10];
format(store,10,"wslot%d",GetWeaponSlot(weaponid)) ;
if(GetPVarInt(playerid,store) != weaponid && weaponid != 46)
{
// report to admins
ResetPlayerWeapons(playerid);
for(new i = 1; i <= 34; i++)
{
format(store,10,"weap%d",i);
if(GetPVarInt(playerid,store) == 1)
{
format(store,10,"weapammu%d",i);
GivePlayerWeapon(playerid,i,GetPVarInt(playerid,st ore));
}
}
return 0;//Shot wont be fired
}

then you dont need to kick someone because it is reset his weapons, dont let him shot because we returned 0
and give him again the weapons.
have fun, and if you liked it leave a +rep
sorry for my english
Reply


Messages In This Thread
Weapon hack - by Xportaler - 01.08.2017, 13:02
Re: Weapon hack - by Camtasia - 01.08.2017, 13:07
Re: Weapon hack - by Xportaler - 01.08.2017, 18:57
Re: Weapon hack - by Omirrow - 01.08.2017, 19:07
Re: Weapon hack - by Camtasia - 05.08.2017, 05:28

Forum Jump:


Users browsing this thread: 1 Guest(s)