16.03.2010, 13:06
i jut wanna to ask how to make simple weapon anti-cheat can anyone give me example? tny
#include <a_samp>
new Minigun;
public OnFilterScriptInit()
{
Minigun=SetTimer("Anti_Minigun",1000,1);
return 1;
}
public OnFilterScriptExit()
{
KillTimer(Minigun);
return 1;
}
forward Anti_Minigun();
public Anti_Minigun()
{
for(new i =0; i < MAX_PLAYERS; i++)
{
new weap;
new ammo;
GetPlayerWeaponData(i, 7, weap, ammo);
if(ammo >= 1 && weap == 38)
{
//Ban him, whatever, but try it with kick, if its wrongly working.
}
}
return 1;
}
Originally Posted by DarkPower
tny alot you help me
![]() |
Originally Posted by Jeffry
Quote:
![]() |
Originally Posted by DarkPower
Quote:
http://pastebin.com/i4WZx7Ni and when player get anyyy of this weapon he dont get ban, but if i put just one weapon ID it will get ban -.- can anyone help me this is very important to me and my community ? |
if( (ammo >= 1) && weapon == 38 || weapon == 39 || weapon == 40)
Originally Posted by _Jay_
That won't work, you have to declare the value you're checking first.
Code:
if( (ammo >= 1) && weapon == 38 || weapon == 39 || weapon == 40) |