Weapon drop, and kick!
#1

Hello, i downloaded a filterscript that when you die, the weapon is on the ground, so, when im trying to get it, the server kicks me for " hack weapon ".

This is the stuff i think , sorry for asking but i can't fix it!.

hackerTrigger(playerid,newweapon){
if(!gPlayerLogged{playerid}) { return 1; }
if(Info[playerid][pTut] == 0) { return 1; }
if(GetPVarInt(playerid, "IsInArena") == 1) { return 1; }

new reason[94],string[94];
format(string, sizeof(string), "AdmWarning: {FFFFFF}%s - Weapon Hacking (%s).", GetPlayerNameEx(playerid), WeaponNames[newweapon]);
ABroadCast(COLOR_ORANGE,string, 2);
format(string, sizeof(string), "AdmCmd: %s fue expulsado por el servidor, razуn: weapon hack", GetPlayerNameEx(playerid));
SendClientMessageToAllEx(COLOR_LIGHTRED, string);
SafeDialogEx(playerid,INVALID_DIALOG,DIALOG_STYLE_ MSGBOX,"Haz sido expulsado del servidor","El Servidor\nte ha expulsado\nRazon: Weapon Hack","Salir","");
SetTimerEx("KickxD",500,0,"d",playerid);

format(reason, sizeof(reason), "Weapon Hacking (%s).", WeaponNames[newweapon]);
return 1;
}
Reply
#2

find the anti-wep hack of your gamemode script

then either you remove it and make your own anti-hack(You can just use the current anti-hack and edit it to your liking like adding variables to your player defining if he should be checked or he should not be checked.");

example:
PHP код:
new Float:health;
GetPlayerHealth(playeridhealth);
if(
health >= 0//coz sometimes the health goes negative, yes you don't see it but it happens that's what causes a bug
{
        
SetPVarInt(playerid"DenyHackCheck" 1);
        return 
1;
}
if(
GetPVarInt(playerid"DenyHackCheck") == 1) { return 0; } //this will fail the script from processing any details for the anti-health hack. Which means it sent a false statement. 
that's just an example though, there are a lot of ways and mine works on my script since I create my own wephack as much as possible or add my own touch on a gamemode anti-cheats so that each time I want to tweak something on the server that needs to Deny the anti-hack check I can do it easily.

if you use my example don't forget to to set the variable to 0 again or else the anti-cheats won't work and DeletePVar on Disconnect coz the PVariables won't get deleted until the gamemode closes so when the player logs in again he will get the PVar again.

That's all I can say
Reply
#3

what
Reply
#4

Quote:
Originally Posted by gamersx
Посмотреть сообщение
what
The anti-cheat on your gamemode is doing this... Disable the anti-cheat, change gamemode, or don't run the filterscript.
Reply
#5

Or learn how to script it yourself
Reply
#6

Instead of being rude, try to help. Its not easy for other people. Thanks to the other comments.
Reply
#7

It wasn't easy for us to learn it as well mate.
Reply
#8

You could integrate the weapon drop FS into your gamemode, or make the weapon drop make the gamemode give the weapon to the player by making the give weapon function get called from the gamemode, rather than the filterscript.

This is more advanced scripting though, so you'll likely need someone to actually do it for you, or learn to do it.

CallRemoteFunction is one thing you'd probably want to look at. But as I say, this is more advanced scripting.
Reply
#9

Thanks for that, probably im going to give up. Honestly, i dont know how to do that
Reply
#10

Run grandlarceny with the drop script, and get an admin script that has an anti-cheat.

In the admin script, it'll have a function you need to use that will give the gun, and in the drop script and anywhere in the gamemode that has GivePlayerWeapon you use CallRemoteFunction to call the function it uses to give the gun.

The reason I suggest using an admin script over a integrated gamemode-anti-cheat is usually the integrated one won't have an option to disable it, and will only handle weapons given by the script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)