SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 13/09/2017, 06:19 PM   #31
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 111
Reputation: 174
Default Re: Pawn.RakNet - write the best anticheat

New example AntiVehicleSpawn.

Original "OnVehicleDeath" ignores return value.
YourShadow is online now   Reply With Quote
Old 14/09/2017, 05:25 PM   #32
adri1
High-roller
 
Join Date: Oct 2010
Posts: 1,918
Reputation: 906
Default Respuesta: Pawn.RakNet - write the best anticheat

This looks interesting
Some for detect player weapon? There is a cheat that returns 0 for GetPlayerWeapons and player can use weapon hacks and not detected
adri1 is online now   Reply With Quote
Old 14/09/2017, 07:08 PM   #33
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 111
Reputation: 174
Default Re: Respuesta: Pawn.RakNet - write the best anticheat

Quote:
Originally Posted by adri1 View Post
This looks interesting
Some for detect player weapon? There is a cheat that returns 0 for GetPlayerWeapons and player can use weapon hacks and not detected
https://github.com/urShadow/Pawn.Rak...zation-packets

PHP Code:
PR_weaponId 
YourShadow is online now   Reply With Quote
Old 15/09/2017, 03:33 AM   #34
Fpwn
Little Clucker
 
Join Date: Aug 2017
Location: Canada
Posts: 30
Reputation: 0
Default Respuesta: Pawn.RakNet - write the best anticheat

Hi, good job, I'll start to try some things because I'm not that expert
__________________
Hola Mundo
Fpwn is offline   Reply With Quote
Old 15/09/2017, 09:15 PM   #35
Meller
Gangsta
 
Meller's Avatar
 
Join Date: Dec 2016
Posts: 544
Reputation: 90
Default Re: Respuesta: Pawn.RakNet - write the best anticheat

Quote:
Originally Posted by Fpwn View Post
Hi, good job, I'll start to try some things because I'm not that expert
What..
You're gonna start some things.. because you're not an expert? You're gonna do something /BECAUSE/ you're not an expert?

Makes no sense to me.. I might be stupid tho, idk.
Meller is online now   Reply With Quote
Old 15/09/2017, 09:30 PM   #36
DTV
Huge Clucker
 
DTV's Avatar
 
Join Date: Dec 2010
Posts: 464
Reputation: 58
Default Re: Respuesta: Pawn.RakNet - write the best anticheat

Quote:
Originally Posted by Meller View Post
What..
You're gonna start some things.. because you're not an expert? You're gonna do something /BECAUSE/ you're not an expert?

Makes no sense to me.. I might be stupid tho, idk.
lmao, he's probably saying he'll try learning it.
__________________


Please don't PM me for help.
DTV is offline   Reply With Quote
Old 16/09/2017, 09:55 AM   #37
kurta999
High-roller
 
kurta999's Avatar
 
Join Date: Apr 2009
Location: Slovakia (HU)
Posts: 1,397
Reputation: 583
Default Re: Pawn.RakNet - write the best anticheat

YourShadow: If you will boring, I would suggest you to add examples for others how you can sync different health values per-player, different position and etc.

Anyway, it doesn't slow down the server to make these very frequently called functions (eg: rpc handler) available in pawn?
kurta999 is offline   Reply With Quote
Old 16/09/2017, 10:38 AM   #38
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 111
Reputation: 174
Default Re: Pawn.RakNet - write the best anticheat

Quote:
Originally Posted by kurta999 View Post
Anyway, it doesn't slow down the server to make these very frequently called functions (eg: rpc handler) available in pawn?
Plugin feels free with 1000 active players online.
YourShadow is online now   Reply With Quote
Old 16/09/2017, 01:19 PM   #39
Aliassassin123456
Huge Clucker
 
Aliassassin123456's Avatar
 
Join Date: Apr 2013
Posts: 246
Reputation: 47
Default Re: Pawn.RakNet - write the best anticheat

Am I missing something in Pawn or this condition is useless?
Code:
const AIM_SYNC = 203;

IPacket:AIM_SYNC(playerid, BitStream:bs)
{
    new aimData[PR_AimSync];
    
    BS_IgnoreBits(bs, 8);
    BS_ReadAimSync(bs, aimData);

    if (aimData[PR_aimZ] != aimData[PR_aimZ]) // is NaN <-
    {
        aimData[PR_aimZ] = 0.0;

        BS_SetWriteOffset(bs, 8);
        BS_WriteAimSync(bs, aimData);
    }

    return 1;
}
And about this example, AntiVehicleSpawn, what about when it called when that vehicle is in water? OnVehicleDeath should be called
https://github.com/urShadow/Pawn.Rak...tiVehicleSpawn
__________________
My GitHub.
My Skype.
Aliassassin123456 is online now   Reply With Quote
Old 16/09/2017, 01:47 PM   #40
povargek
Big Clucker
 
Join Date: Oct 2012
Posts: 78
Reputation: 16
Default Re: Pawn.RakNet - write the best anticheat

Quote:
Originally Posted by Aliassassin123456 View Post
Am I missing something in Pawn or this condition is useless?
Code:
const AIM_SYNC = 203;

IPacket:AIM_SYNC(playerid, BitStream:bs)
{
    new aimData[PR_AimSync];
    
    BS_IgnoreBits(bs, 8);
    BS_ReadAimSync(bs, aimData);

    if (aimData[PR_aimZ] != aimData[PR_aimZ]) // is NaN <-
    {
        aimData[PR_aimZ] = 0.0;

        BS_SetWriteOffset(bs, 8);
        BS_WriteAimSync(bs, aimData);
    }

    return 1;
}
And about this example, AntiVehicleSpawn, what about when it called when that vehicle is in water? OnVehicleDeath should be called
https://github.com/urShadow/Pawn.Rak...tiVehicleSpawn

i fixed car respawning when it in water with MapAndreas plugin

Code:
public OnVehicleRequestDeath(vehicleid, killerid)
{
	new Float:X, Float:Y, Float:Z, Float:health;
	GetVehiclePos(vehicleid,X,Y,Z);
	MapAndreas_FindZ_For2DCoord(X,Y,Z);
	GetVehicleHealth(vehicleid, health);
	
	if(health > 300.0 && Z != 0.0) // If car above the water MapAndreas return a height 0.0
	{
		return 0;
	}
	
	return 1;
}
AimZ cheat passes the nan parameter. NaN is not equal to itself, so it's the way to check variable for nan value.
__________________
Sorry for my bad English
povargek is online now   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] Using y_xml to write/read xml files. [Another way to write CFG data but better] Ahmad45123 Tutorials 8 13/03/2015 03:41 AM
VC:MP RakNet Version? Christopher. Everything and Nothing 1 27/01/2010 10:17 PM


All times are GMT. The time now is 07:10 PM.


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