SA-MP Forums Archive
[FilterScript] [Filterscript] Anti Weapon Cheating System (v.0.2 ) (Tested..Operates!) - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [Filterscript] Anti Weapon Cheating System (v.0.2 ) (Tested..Operates!) (/showthread.php?tid=71262)

Pages: 1 2


[Filterscript] Anti Weapon Cheating System (v.0.2 ) (Tested..Operates!) - illay - 31.03.2009

Anti Weapon Cheating System, v.0.2 (Bug fixed)

developing!!!

Author: illay

pawn Код:
#include <a_samp>

/*Latest Update 03/04/09*/

forward public WeaponCheating();
forward public BanPlayer();

new TheWeapon[MAX_PLAYERS];

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Anti-Weapon Cheat by illay");
    print(" Version V.0.2 (Tested) l.updt: 03/04/09");
    print("--------------------------------------\n");
    SetTimer("WeaponCheating",1000,true);
    return 1;
}

public WeaponCheating() { //by illay
    for(new i=0;i<MAX_PLAYERS;i++) {
      TheWeapon[i]=GetPlayerWeapon(i);
      if(TheWeapon[i]==35 /*thower*/ ||TheWeapon[i]==36 /*Rpg*/|| TheWeapon[i]==37 /* h_rpg*/|| TheWeapon[i]==38 /*minigun*/|| TheWeapon[i]==43 /*camera*/|| TheWeapon[i]==44/*Glasses*/|| TheWeapon[i]==45/*Glasses*/) {
        SendClientMessage(i, 0xE60000FF, "No cheating in server! You have BANNED!");
        return SetTimerEx("BanPlayer",500,false,"i","i");//Against causeless bannings
        }
    }
    return 1; //return WeaponCheating() /retrurn WeaponCheating()/
}

public BanPlayer() { //by illay
  for(new i=0;i<MAX_PLAYERS;i++) {
    return BanEx(i,"WEAPON CHEATING");//samp.ban file reason "In game ban => WEAPON CHEATING
    }
    /*
    Forbidding agendum:
    ------------------
    ip (hidden) [03/04/09 | 15:19:33] Player - WEAPON CHEATING <= reason
    ------------------
    */

    return 1;
}



Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - _TeRmiNaToR_ - 31.03.2009

if it found the weapons in server ?


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - Norn - 31.03.2009

This should be in the useful snippets thread, it's hardly a system.

PS. When forwarding you don't add the "public".

(Your code won't even work, GetPlayerWeapon(i) has to be called after || still and your BanPlayer() function will ban the entire server, i recommend you remove this immediately.)


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - Yuval_Baruch - 31.03.2009

Use GetPlayerWeaponData...
GetPlayerWeapon shows only the weapon that player is holding at the moment..
and what if i take out a weapon that you didnt wrote in here? so i still can use weapon hacks
with this FS, if you want to block weapons i suggest you to use 'SetDisabledWeapons' in ongamemodeinit...


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - illay - 02.04.2009

Yuval_Baruch,

Yes let him not receive, but never therewith ban..

_TeRmiNaToR_ ,

The organ you stretch at that time you take that gun the script the ordinal number

Norn,

There is written his essence all the same how


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - G_ROW_Chez - 02.04.2009

nice try, but it is not anticheat... add more things to it, like ammo detector or somethin... it's fucknhard to say to you, but it's good work for novice


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - luby - 02.04.2009

It will ban all players ;o?
for(new i=0;i<MAX_PLAYERS;i++) {
return BanEx(i,"WEAPON CHEATING");//Reason to samp.ban file
}

or just id 0? (because of return)
But i think it will not work.


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - G_ROW_Chez - 02.04.2009

haha xD
return can be used here if
for(new i=0; i<MAX_PLAYERS; i++)
{
if(banid==i) return something
}
but it's stupid, and needs to TimerEx
try... just this

forward BanPlayer(playerid);
public WeaponCheating() {
for(new i=0;i<MAX_PLAYERS;i++) {
if(GetPlayerWeapon(i)==35||36||37||38||43||44||45) {
SendClientMessage(i, 0xE60000FF, "No cheating in server! BANNED!");
//return SetTimerEx("BanPlayer",1000,false,"i","i"); do not use it when not if expression
SetTimerEx("BanPlayer",1000,false,"i","i");
return 1;
}
}
return 1;
}

public BanPlayer(playerid)
{
BanEx(playerid,"WEAPON CHEATING");//Reason to samp.ban file
return 1;
}

somthn like this


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - luby - 02.04.2009

Quote:
Originally Posted by G_ROW_Chez
haha xD
return can be used here if
((blab blah))

somthn like this
you should use SetTimerEx this way :
SetTimerEx("BanPlayer",1000,false,"i",i);

but why you used it? just put BanEx under SendClientMessage and it will ban and show message.


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - G_ROW_Chez - 02.04.2009

he needs 1 second wait... =) i did 1 second timer =)
and TimerEx works fine even with this
SetTimerEx("public", time, false, "%d", "money");
so i write right too =)


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - luby - 02.04.2009

I prefer use functions like it was written...
You dont need % in formatting. and you should use correct types of variables
"money" is string, money is integer


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - G_ROW_Chez - 03.04.2009

hey, pipl, maybe we will not try to disput? =) i'm not a noob, you too... so lets just forgot about try of this newbie guy, ok?


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - [JIeXa] - 03.04.2009

#include <a_samp>

public OnPlayerUpdate(playerid) if(GetPlayerWeapon(playerid)==35||36||37||38||43|| 44||45) SendClientMessage(playerid, 0xE60000FF, "No cheating in server! BANNED!"), BanEx(playerid,"WEAPON CHEATING");

author lol...


Re: [Filterscript] Anti Weapon Cheating System (v.Beta) - luby - 03.04.2009

wont work.
GetPlayerWeapon(playerid)==35||36||37||38||43||44| |45
is bit swapping.
You should use { and } because you can just use ONE func without it.


Re: [Filterscript] Anti Weapon Cheating System (0.2) - illay - 03.04.2009

Everyone!

Functional bugs now already faultlessly operates I repaired feel sorry for this


Re: [Filterscript] Anti Weapon Cheating System (v.0.2 ) (Tested..Operates!) - luby - 03.04.2009

return SetTimerEx("BanPlayer",500,false,"i","i");//Against causeless bannings

Give me a reason why it should work. ("i" is string, i is integer, formatting 'i' makes func gets integer)


Re: [Filterscript] Anti Weapon Cheating System (v.0.2 ) (Tested..Operates!) - illay - 03.04.2009

_TeRmiNaToR_ ,

pawn Код:
public OnPlayerConnect(playerid)
{
if(playerid == 0) //If player id = 0 -> Kick. That how do the organ step up this? ;)
{
Kick(playerid);
}
}
Fake thrice at that time rates if joins in inside ten second playful


Re: [Filterscript] Anti Weapon Cheating System (v.0.2 ) (Tested..Operates!) - illay - 03.04.2009

Luby,

i = playerid shortly. i = integer but non herein.

pawn Код:
for(new i=0;i<MAX_PLAYERS;i++) { /*Here code*/ }
else
for(new playerid=0;playerid<MAX_PLAYERS;playerid++) { /*Here code*/ }



Re: [Filterscript] Anti Weapon Cheating System (v.0.2 ) (Tested..Operates!) - luby - 03.04.2009

why you didn't use :
return SetTimerEx("BanPlayer",500,false,"i",i);//Against causeless bannings
??


Re: [Filterscript] Anti Weapon Cheating System (v.0.2 ) (Tested..Operates!) - illay - 03.04.2009

Luby,

Both operates version. If do you like it you do not rewrite thus