SA-MP Forums

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

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

New example AntiVehicleSpawn.

Original "OnVehicleDeath" ignores return value.
YourShadow is offline   Reply With Quote
Old 14/09/2017, 04:25 PM   #32
adri1
Banned
 
Join Date: Oct 2010
Posts: 1,940
Reputation: 955
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 offline   Reply With Quote
Old 14/09/2017, 06:08 PM   #33
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 118
Reputation: 232
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 offline   Reply With Quote
Old 15/09/2017, 02:33 AM   #34
Fpwn
Little Clucker
 
Join Date: Jul 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, 08:15 PM   #35
Meller
Banned
 
Join Date: Dec 2016
Posts: 650
Reputation: 132
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 offline   Reply With Quote
Old 15/09/2017, 08:30 PM   #36
DTV
Huge Clucker
 
DTV's Avatar
 
Join Date: Dec 2010
Posts: 496
Reputation: 85
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, 08:55 AM   #37
kurta999
High-roller
 
kurta999's Avatar
 
Join Date: Apr 2009
Location: Slovakia (HU)
Posts: 1,423
Reputation: 626
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, 09:38 AM   #38
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 118
Reputation: 232
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 offline   Reply With Quote
Old 16/09/2017, 12:19 PM   #39
Aliassassin123456
Huge Clucker
 
Aliassassin123456's Avatar
 
Join Date: Apr 2013
Posts: 267
Reputation: 67
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.
Founder of ArSaCiA Game Community (AKA LifeForGame), THE most popular RPG server in Iran.
Aliassassin123456 is online now   Reply With Quote
Old 16/09/2017, 12:47 PM   #40
povargek
Big Clucker
 
Join Date: Oct 2012
Posts: 79
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 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 Lançamentos/Releases 32 10/02/2018 07:03 PM
[Tutorial] Handlers - Pawn.RakNet Jelly23 Tutorials 6 29/01/2018 11:46 PM
[Tutorial] Handlers - Pawn.RakNet Jelly23 Lançamentos/Releases 14 02/01/2018 11:04 PM
[Tutorial] RPC - Pawn.RakNet Jelly23 Tutorials 21 13/12/2017 09:51 PM
[Tutorial] Packets - Pawn.RakNet Jelly23 Tutorials 2 16/11/2017 05:46 PM


All times are GMT. The time now is 02:34 AM.


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