SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 03/02/2018, 11:02 PM   #171
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,634
Reputation: 202
Default Re: Pawn.RakNet

Quote:
Originally Posted by B4dSh33p View Post
Why is this happening?

What's your code?
__________________
actor_plus - v4.1.2
I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath
Dayrion is online now   Reply With Quote
Old 07/02/2018, 06:35 PM   #172
ZaHHak
Little Clucker
 
Join Date: Sep 2017
Posts: 42
Reputation: 3
Default Re: Pawn.RakNet

is it possible to send PASSENGER_SYNC updates to the same player even if it is paused?
ZaHHak is offline   Reply With Quote
Old 14/02/2018, 06:02 PM   #173
sniper-termit
Little Clucker
 
Join Date: Mar 2011
Posts: 44
Reputation: 0
Default Re: Pawn.RakNet

this script will disable GetPlayerTargetPlayer on everyone with weapon in hands
80% aimbots work on target, with my script you can fix alot of aimbots on your server.

Code:
	IPacket:PLAYER_SYNC(playerid, BitStream:bs)
	{
		if(GetPlayerWeapon(playerid) >= 22 && !IsPlayerInAnyVehicle(playerid) && GetPlayerWeapon(playerid) != 34)
		{
			//with ghostmode you can't hit player via weaponid 34
			//there must be a check if player crouch return false
			new onFootData[PR_OnFootSync];
			BS_IgnoreBits(bs, 8);
			BS_ReadOnFootSync(bs, onFootData);
			if(onFootData[PR_specialAction] != 3)
			{
				onFootData[PR_specialAction] = 3;
				BS_SetWriteOffset(bs, 8);
				BS_WriteOnFootSync(bs, onFootData);
			}
		}
		return true;
	}
sniper-termit is offline   Reply With Quote
Old 15/02/2018, 12:31 AM   #174
Chaser98
Little Clucker
 
Join Date: Nov 2010
Posts: 47
Reputation: 21
Default Re: Pawn.RakNet

Quote:
Originally Posted by sniper-termit View Post
this script will disable GetPlayerTargetPlayer on everyone with weapon in hands
80% aimbots work on target, with my script you can fix alot of aimbots on your server.

Code:
	IPacket:PLAYER_SYNC(playerid, BitStream:bs)
	{
		if(GetPlayerWeapon(playerid) >= 22 && !IsPlayerInAnyVehicle(playerid) && GetPlayerWeapon(playerid) != 34)
		{
			//with ghostmode you can't hit player via weaponid 34
			//there must be a check if player crouch return false
			new onFootData[PR_OnFootSync];
			BS_IgnoreBits(bs, 8);
			BS_ReadOnFootSync(bs, onFootData);
			if(onFootData[PR_specialAction] != 3)
			{
				onFootData[PR_specialAction] = 3;
				BS_SetWriteOffset(bs, 8);
				BS_WriteOnFootSync(bs, onFootData);
			}
		}
		return true;
	}
Care to explain how exactly this stops aimbots? I tried it with silentaim and it doesn't stop it.
Chaser98 is offline   Reply With Quote
Old 15/02/2018, 10:29 AM   #175
sniper-termit
Little Clucker
 
Join Date: Mar 2011
Posts: 44
Reputation: 0
Default Re: Pawn.RakNet

Quote:
Originally Posted by Chaser98 View Post
Care to explain how exactly this stops aimbots? I tried it with silentaim and it doesn't stop it.
as i said, this script will fix many of aimbots, but not all of them.
this will disable targets on everyone, aimbots working on target will not work.
silent aim sends to server fake bullet data, you need check coords in OnPlayerWeaponShot to fix that cheat.
sniper-termit is offline   Reply With Quote
Old 17/02/2018, 05:27 AM   #176
Chaprnks
Gangsta
 
Chaprnks's Avatar
 
Join Date: Sep 2007
Location: Soviet America
Posts: 695
Reputation: 53
Default Re: Pawn.RakNet - write the best anticheat

Quote:
Originally Posted by Kaperstone View Post
Code:
new isdisabled=0;

cmd:disablefist() {
    disabled=1;
    SetPlayerDisableKeysSync(playerid, KEY_FIRE);
    return 1;
}

IPacket:PLAYER_SYNC(playerid, BitStream:bs)
{
    new onFootData[PR_OnFootSync];

    BS_IgnoreBits(bs, 8);
    BS_ReadOnFootSync(bs, onFootData);
    if(isdisabled&&GetPlayerWeapon(playerid)==0) {
        ProcessDisabledKeys(playerid, onFootData[PR_lrKey], onFootData[PR_udKey], onFootData[PR_keys]);
    }
    BS_SetWriteOffset(bs, 8);
    BS_WriteOnFootSync(bs, onFootData);

    return 1;
}
Is there a way to do something like SetPlayerDisableKeysSync(playerid, KEY_FIRE); then later SetPlayerEnableKeysSync(playerid, KEY_FIRE);? Cause I only want it to be disabled for certain conditions, but re-enabled later.
__________________

Chaprnks is offline   Reply With Quote
Old 17/02/2018, 11:23 AM   #177
Kaperstone
High-roller
 
Kaperstone's Avatar
 
Join Date: May 2011
Location: Vladivostok, Russia
Posts: 3,287
Reputation: 758
Default Re: Pawn.RakNet - write the best anticheat

Quote:
Originally Posted by Chaprnks View Post
Is there a way to do something like SetPlayerDisableKeysSync(playerid, KEY_FIRE); then later SetPlayerEnableKeysSync(playerid, KEY_FIRE);? Cause I only want it to be disabled for certain conditions, but re-enabled later.
KEY_FIRE is defined to be 4 because binarically it will turn an integer in the set to 1.

To disable KEY_FIRE do
SetPlayerDisableKeysSync(playerid, KEY_FIRE);
to enable again do
SetPlayerDisableKeysSync(playerid, 0);
this will turn all the 1's in the binary set to 0.


Moreover, when you add more keys, the previous keys that you disabled are enabled, example:
Code:
// Disable KEY_FIRE
SetPlayerDisableKeysSync(playerid, KEY_FIRE);
// Disable fire key, sprint and crouch
SetPlayerDisableKeysSync(playerid, (KEY_FIRE | KEY_SPRINT | KEY_CROUCH));
// Enable everything, but disable crouch
SetPlayerDisableKeysSync(playerid, KEY_CROUCH);


Remember that it doesn't disable on the client side, it disables the synchronization to other clients.
__________________
Find me on GitHub SEF Community (Official NEF Successor) SALobby Community SA:MP Reviews Find me on Steam

Last edited by Kaperstone; 17/02/2018 at 05:25 PM.
Kaperstone is offline   Reply With Quote
Old 17/02/2018, 03:20 PM   #178
Spmn
Gangsta
 
Join Date: Jun 2015
Location: Romania
Posts: 531
Reputation: 126
Default Re: Pawn.RakNet

Code:
SetPlayerDisableKeysSync(playerid, (KEY_FIRE & KEY_SPRINT & KEY_CROUCH));
I'm pretty sure you wanted to type OR instead of AND
Spmn is online now   Reply With Quote
Old 17/02/2018, 03:33 PM   #179
Splav
Big Clucker
 
Join Date: Jan 2011
Posts: 132
Reputation: 2
Default Re: Pawn.RakNet

Quote:
Originally Posted by sniper-termit View Post
silent aim sends to server fake bullet data, you need check coords in OnPlayerWeaponShot to fix that cheat.
I don't understand how can I check coords to fix silent aim. This coords is already incorrect when they come to server

Can you explain more accurate please?
__________________
:

1. - R3 [SQLite]
2. - R2 [MySQL]
3. GeoIP Include R1
Splav is offline   Reply With Quote
Old 17/02/2018, 05:25 PM   #180
Kaperstone
High-roller
 
Kaperstone's Avatar
 
Join Date: May 2011
Location: Vladivostok, Russia
Posts: 3,287
Reputation: 758
Default Re: Pawn.RakNet

Quote:
Originally Posted by Spmn View Post
Code:
SetPlayerDisableKeysSync(playerid, (KEY_FIRE & KEY_SPRINT & KEY_CROUCH));
I'm pretty sure you wanted to type OR instead of AND
Thanks for correcting.
__________________
Find me on GitHub SEF Community (Official NEF Successor) SALobby Community SA:MP Reviews Find me on Steam
Kaperstone is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Pacotes - Pawn.RakNet Jelly23 Lanamentos/Releases 32 10/02/2018 08:03 PM
[Tutorial] Handlers - Pawn.RakNet Jelly23 Tutorials 6 30/01/2018 12:46 AM
[Tutorial] Handlers - Pawn.RakNet Jelly23 Lanamentos/Releases 14 03/01/2018 12:04 AM
[Tutorial] RPC - Pawn.RakNet Jelly23 Tutorials 21 13/12/2017 10:51 PM
[Tutorial] Packets - Pawn.RakNet Jelly23 Tutorials 2 16/11/2017 06:46 PM


All times are GMT. The time now is 11:13 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.