public anticheat()
{
if(weaponid == 38) //minigun
{
BanEx( playerid, "MiniGun Hacking" );
}
}
public anticheat()
{
if(weaponid == 38) //minigun
{
BanEx( playerid, "MiniGun Hacking" );
}
else if(weaponid == 37) //flamethrower
{
BanEx( playerid, "Flamethrower Hacking" );
}
}
public anticheat()
{
if(weaponid == 38) //minigun
{
BanEx( playerid, "MiniGun Hacking" );
}
if(weaponid == 37) //
{
BanEx( playerid, "flamethrower Hacking" );
}
}
#include <a_samp>
new Text: BanMessage;
new BannedWeapons [ 999 ];
new MAX_BANNED_WEAPONS = 0;
new Spawned [ MAX_PLAYERS ];
//==============================================================================
public OnFilterScriptInit ( )
{
BanWeapon (38); // Minigun
BanWeapon (35); //RGP
BanWeapon (36); // RL
BanWeapon (39); // Flamethrower
SetTimer ("BannedWeaponCheck",1000 ,true);
return 1;
}
//==============================================================================
forward BannedWeaponCheck ();
public BannedWeaponCheck ()
{
for (new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
for ( new weaponid = 0; weaponid < MAX_BANNED_WEAPONS; weaponid++)
{
if (GetPlayerWeapon (playerid) == BannedWeapons [weaponid] && Spawned [playerid] == 1 )
{
ResetPlayerWeapons (playerid);
Kick (playerid);
}
}
}
}
//==============================================================================
public OnPlayerDisconnect (playerid , reason)
{
Spawned [playerid] = 0;
return 1;
}
//==============================================================================
public OnPlayerConnect (playerid)
{
Spawned [playerid] = 0;
return 1;
}
//==============================================================================
public OnPlayerSpawn (playerid)
{
Spawned [playerid] = 1;
return 1;
}
//==============================================================================
public OnPlayerDeath (playerid , killerid , reason)
{
Spawned [playerid] = 0;
return 1;
}
//==============================================================================
stock BanWeapon (weaponid)
{
BannedWeapons [MAX_BANNED_WEAPONS] = weaponid;
MAX_BANNED_WEAPONS = MAX_BANNED_WEAPONS += 1;
return MAX_BANNED_WEAPONS - 1;
}
//==============================================================================
stock BanWithMessage ( playerid )
{
TextDrawShowForPlayer ( playerid , BanMessage );
TogglePlayerControllable ( playerid , 0 );
GameTextForPlayer ( playerid , " " , 100000000000000 , 1 );
Kick ( playerid );
new string [ 256 ] , weaponname [ 256 ] , weaponid;
weaponid = GetPlayerWeapon ( playerid );
GetWeaponName ( weaponid , weaponname , 256 );
}
|
public anticheat() { switch(weaponid) { case 38: BanEx( playerid, "MiniGun Hacking"); case 37: BanEx( playerid, "Flamethrower Hacking"); } return 1; } |
|
Originally Posted by ► James_Alex
Quote:
|