Idea: Server Sided Guns!
#1

Hey okay there is server sided money for an anti cheat already, but i was wondering is it possible for one of you head crazy scripters to script a server sided guns anti hack? so haxed weps would be taken away and non haxed wouldnt
Reply
#2

Think that's gonna be really hard, but good idea though :P, also the serverside money is a bit buggy 'cause it detects stunting money as a hack and also soda buying, buying food, buying at the ammunation and all that sort of things.
Reply
#3

its the same with all server sided things, create an array which stores the data
And the same is with the problems, only server sided things gets dedected
so if you buy a weapon at the ammunation it would be a hack
so this code needs an check for the players position
and then hacking would be still possible there
Reply
#4

I took out the ammunation in my server and created an anti spawn weapon script, it stores the weapon id into its slot and checks if the players weapons differ from what the server has, it's really effective since cheaters learn there's some weapons that are forbidden so they cheat weapons that aren't forbidden.

at the top
Code:
new sw[MAX_PLAYERS];
in "OnFilterScriptInit()"
Code:
SetTimer("WeaponCheck",5000,1);
in the onplayerconnect, disconnect, death and spawn.
Code:
sw[playerid] = 0;
Then I have this.
Code:
forward WeaponCheck();
public WeaponCheck()
{
	new string[128];
	new name[30];
  new Float:health[MAX_PLAYERS];
	for(new j;j<MAX_PLAYERS;j++)
	{
	  GetPlayerHealth(j,health[j]);
		if(IsPlayerConnected(j) && health[j] >= 10 && GetPlayerState(j) == PLAYER_STATE_ONFOOT)
	  {
			if (CallRemoteFunction("OnPlayerWeaponCheck","d",j))
			{
				sw[j]++;
				if(sw[j] >= 3)
				{
			  	GetPlayerName(j,name,sizeof(name));
	      		CallRemoteFunction("BanIncrease","d",j);
				  	format(string, sizeof(string), "AC BAN: %s has been banned", name);
					SendClientMessageToAll(colour_red, string);
	      		new Float:X,Float:Y,Float:Z;
	      		GetPlayerPos(j,X,Y,Z);
				  	format(string, sizeof(string), "AC Ban: spawned weapons position(%f,%f,%f)",X,Y,Z);
					sw[j] = 0;
					BanEx(j,string);
				}
			}
			else if(!CallRemoteFunction("OnPlayerWeaponCheck","d",j)) sw[j] = 0;
		}
	}
}
all the above is in a filterscript.

in the Game Mode I have this at the top
Code:
new WeaponCheck[MAX_PLAYERS][12];
every time a player gets a weapon
Code:
WeaponCheck[playerid][2] = 23;
23 is the weaponid and 2 is the slot

then this function for the filterscript to call
Code:
forward OnPlayerWeaponCheck(playerid);
public OnPlayerWeaponCheck(playerid)
{
	for(new i = 0; i < 12; i++)
	{
	  new tweap, tammo;
	  GetPlayerWeaponData(playerid, i ,tweap ,tammo);
	  if(tweap != WeaponCheck[playerid][i]) return tweap;
	}
	return 0;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)