[Include] Server Sided Weapons
#1

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)
Reply
#2

Oh wait, i forgot SetSpawn info..
Edit: fixed
Reply
#3

Nice !
Reply
#4

Sexay...
Reply
#5

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

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.
Reply
#7

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.
Reply
#8

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.
Reply
#9

Good can u do it with bit optimise ?
Reply
#10

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

Great Job
Reply
#12

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
Reply
#13

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

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.
Reply
#15

NAh, i don't use any custom functions
Reply
#16

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).
Reply
#17

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

Nice Useful keep it up
Reply
#19

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?
Reply
#20

Nice and useful...Good effort and idea
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)