SA-MP Forums Archive
[Include] Server Sided Weapons - 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)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Server Sided Weapons (/showthread.php?tid=203513)

Pages: 1 2


Server Sided Weapons - wups - 27.12.2010

Server Sided Weapons


Since my old weapon anti cheat is outdated, i've decided to create a new thread.
I've learned from my mistakes, and made some fixing.
The whole thing is scripted from scratch.

Features
• Doesn't ban innocent people, if you use it properly.
• Bans all cheaters who make weapons with cheats.
• Works with NON streamed weapon pickups.
• Works with Class weapons.
• Plug & Play
• Works with filterscripts

It still doesn't work with ammu-nation shops! I am not planing making a timer which checks if a player is in an ammunation etc. This will be fixed if i find a proper solution.

Installing

• Download the file and place in /pawno/includes

pawn Код:
#include <GAC>
• On the top of your game mode.
• And after "#define FILTERSCRIPT" in your filterscripts

Credits
• Double-O-Seven for some parts of the code.
• Me for everything else.

Testing
• I did some small testing on the GrandLarc game mode, everything seem to work.

Download
Pastebin(v2)


Re: Server Sided Weapons - wups - 27.12.2010

Oh wait, i forgot SetSpawn info..
Edit: fixed


Re: Server Sided Weapons - iJumbo - 27.12.2010

Nice !


Re: Server Sided Weapons - willsuckformoney - 27.12.2010

Sexay...


Re: Server Sided Weapons - Lorenc_ - 27.12.2010

Very nice, although show maybe the functions in the include >.< OR does it not use custom cash functions?


Re: Server Sided Weapons - FreshKilla - 27.12.2010

You shouldn't make it banable, What if people are SA-MP lag bugged were the variable will set to 0 and he still has the weapon in his hand because he's lag bugged and he'll get banned.... and it should have a code were it sets the PlayerWeapon[weaponid] to 0 when he has no more ammo for it because it might bug up all you have to do is get a server side weapon with like 1 Ammo then hack the same gun and get like 100 bullets free without getting caught.


Re: Server Sided Weapons - Scenario - 27.12.2010

Quote:
Originally Posted by FreshKilla
Посмотреть сообщение
You shouldn't make it banable, What if people are SA-MP lag bugged were the variable will set to 0 and he still has the weapon in his hand because he's lag bugged and he'll get banned.... and it should have a code were it sets the PlayerWeapon[weaponid] to 0 when he has no more ammo for it because it might bug up all you have to do is get a server side weapon with like 1 Ammo then hack the same gun and get like 100 bullets free without getting caught.
You can easily go in and change "Ban()" to "Kick()".

Good job, by the way.


Re: Server Sided Weapons - wups - 27.12.2010

Quote:
Originally Posted by FreshKilla
Посмотреть сообщение
You shouldn't make it banable, What if people are SA-MP lag bugged were the variable will set to 0 and he still has the weapon in his hand because he's lag bugged and he'll get banned.... and it should have a code were it sets the PlayerWeapon[weaponid] to 0 when he has no more ammo for it because it might bug up all you have to do is get a server side weapon with like 1 Ammo then hack the same gun and get like 100 bullets free without getting caught.
Well, i haven't got any problems with the first argument, and about the free bullets - Thats why i made it ban, so people wouldn't experiment the anti-cheat. Most of cheaters go on a server make a few weapons without even thinking about any silly anti-cheat.


Re: Server Sided Weapons - HACKHERS - 29.12.2010

Good can u do it with bit optimise ?


Re: Server Sided Weapons - wups - 29.12.2010

Quote:
Originally Posted by HACKHERS
Посмотреть сообщение
Good can u do it with bit optimise ?
I don't think so.


Re: Server Sided Weapons - Windows7 - 31.01.2011

Great Job


Re: Server Sided Weapons - sekol - 21.03.2011

I have encountered a problem.
pawn Код:
public LoadWeapons(playerid)
{
    new accname[128], weapon[128];
    format(accname, sizeof(accname), "GP/Konta/%s.ini", GetName(playerid));
    new weapons[13][2];
    for(new i = 0; i < 13; i++)
    {
        format(weapon, sizeof(weapon), "Weapon%d", i); weapons[i][0] = djInt(accname, weapon);
        format(weapon, sizeof(weapon), "Weapon%dAmmo", i); weapons[i][1] = djInt(accname, weapon);
        GivePlayerWeapon(playerid, weapons[i][0], weapons[i][1]);
        SetPVarInt(playerid, "Weapons", 1);
    }
    return 1;
}
This function restores player weapons after loggin back into game on players first spawn.
The problem is, this function bans me


Re: Server Sided Weapons - laag - 21.03.2011

If I understand correctly, you made some crazy weaps with ******, and now can't login ?
Код:
if(IsPlayerAdmin) return 1;



Re: Server Sided Weapons - wups - 21.03.2011

Quote:
Originally Posted by sekol
Посмотреть сообщение
I have encountered a problem.
pawn Код:
public LoadWeapons(playerid)
{
    new accname[128], weapon[128];
    format(accname, sizeof(accname), "GP/Konta/%s.ini", GetName(playerid));
    new weapons[13][2];
    for(new i = 0; i < 13; i++)
    {
        format(weapon, sizeof(weapon), "Weapon%d", i); weapons[i][0] = djInt(accname, weapon);
        format(weapon, sizeof(weapon), "Weapon%dAmmo", i); weapons[i][1] = djInt(accname, weapon);
        GivePlayerWeapon(playerid, weapons[i][0], weapons[i][1]);
        SetPVarInt(playerid, "Weapons", 1);
    }
    return 1;
}
This function restores player weapons after loggin back into game on players first spawn.
The problem is, this function bans me
Maybe You use some custom GivePlayerWeapon functions or something like another anticheat.
And everyone, please update the code, i did some minor fixing.


Re: Server Sided Weapons - sekol - 22.03.2011

NAh, i don't use any custom functions


Re: Server Sided Weapons - wups - 22.03.2011

Quote:
Originally Posted by sekol
Посмотреть сообщение
NAh, i don't use any custom functions
Try including the anticheat right after <a_samp>
Also, make sure it's included in all of your filterscripts, which have weapon functions(#define FILTERSCRIPT before including).


Re: Server Sided Weapons - sekol - 22.03.2011

I changed the timer in include from 800 to 1000 and it works fine


Re: Server Sided Weapons - GAMER_PS2 - 06.11.2011

Nice Useful keep it up


Re: Server Sided Weapons - Negat1Ve - 28.12.2011

pawn Код:
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\pawno\include\GAC.inc(124) : warning 201: redefinition of constant/macro (symbol "GivePlayerWeapon")
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\pawno\include\GAC.inc(184) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\pawno\include\GAC.inc(223) : warning 201: redefinition of constant/macro (symbol "AddPlayerClass")
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\pawno\include\GAC.inc(236) : warning 201: redefinition of constant/macro (symbol "AddPlayerClassEx")
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(439) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(440) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(441) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(442) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(443) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(444) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(445) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(446) : warning 202: number of arguments does not match definition
on these lines:
pawn Код:
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(439) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(440) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(441) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(442) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(443) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(444) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(445) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Valerijs\Desktop\Reinis\GTA\SAMP\gamemodes\DMSERVER.pwn(446) : warning 202: number of arguments does not match definition
I've got this
pawn Код:
dg1 = CreatePickup(352, 2,-2786.3894,245.6140,7.1875); // pickup
    dg2 = CreatePickup(358, 2,-2783.9016,245.6378,7.1875); // pickup
    dg3 = CreatePickup(1240, 2,-2781.6362,245.6651,7.1875); // pickup
    dg4 = CreatePickup(1242, 2,-2779.3433,245.6928,7.1875); //pickup
    dg5 = CreatePickup(356, 2,-2776.9600,245.7215,7.1875); // pickup
    dg6 = CreatePickup(348, 2,-2774.6858,245.7489,7.1875); // pickup
    dg7 = CreatePickup(336, 2,-2773.0239,245.7690,7.1875); // pickup
    dg8 = CreatePickup(350, 2,-2770.7288,245.7967,7.1875); // pickup


What The problem?


Re: Server Sided Weapons - Plovix - 13.12.2012

Nice and useful...Good effort and idea