[Plugin] Pawn.RakNet

Is it possible to do an Anti-NoFall like this?
This NoFall comes active on some S0b3its as well. See:

https://www.youtube.com/watch?v=0juVMD1SVME
Reply

Quote:
Originally Posted by KoloradO
View Post
Is it possible to do an Anti-NoFall like this?
This NoFall comes active on some S0b3its as well. See:

https://www.youtube.com/watch?v=0juVMD1SVME
This is not what you should use the plugin for.
Reply

Anti - InvalidCamera (Anti-Crasher)

This code will block the players, which will attack your server with the invalid camera!
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_camMode] == 45 || aimData[PR_camMode] == 49)
	{
		new string[144],name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, name, sizeof(name));
		format(string,sizeof(string),"{FF0000}[Anti-InvalidCamera]: {FFFF00}%s {999999}(ID:%d) {00FF00}auto-kicked {FF0000}[Reason: InvalidCamera]", name,playerid);
		SendClientMessageToAll(-1, string);
		string[0] = EOS;
		Kick(playerid);
		return false;
	}
	return true;
}
Reply

Anti - BadBullet (Anti - Cheat)

This code will block players who are trying to flood you in server_log "bullet data"
Code:
const BULLET_SYNC = 206;
IPacket:BULLET_SYNC(playerid, BitStream:bs)
{
	new bulletData[PR_BulletSync];

	BS_IgnoreBits(bs, 8);
	BS_ReadBulletSync(bs, bulletData);
	if (!(-35000.0 <= bulletData[PR_origin][0] <= 35000.0) || !(-35000.0 <= bulletData[PR_origin][1] <= 35000.0) || !(-35000.0 <= bulletData[PR_origin][2] <= 35000.0))
	{
		new string[144],name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, name, sizeof(name));
		format(string,sizeof(string),"{FF0000}[Anti-BadBulletDataOrigin]: {FFFF00}%s {999999}(ID:%d) {00FF00}auto-kicked {FF0000}[Reason: BadBulletDataOrigin]", name,playerid);
		SendClientMessageToAll(-1, string);
		string[0] = EOS;
		Kick(playerid);
		return false;
	}

	if (!(-35000.0 <= bulletData[PR_hitPos][0] <= 35000.0) || !(-35000.0 <= bulletData[PR_hitPos][1] <= 35000.0) || !(-35000.0 <= bulletData[PR_hitPos][2] <= 35000.0))
	{
		new string[144],name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, name, sizeof(name));
		format(string,sizeof(string),"{FF0000}[Anti-BadBulletDataHitPos]: {FFFF00}%s {999999}(ID:%d) {00FF00}auto-kicked {FF0000}[Reason: BadBulletDataHitPos]", name,playerid);
		SendClientMessageToAll(-1, string);
		string[0] = EOS;
		Kick(playerid);
		return false;
	}
	return true;
}
Reply

Quote:
Originally Posted by KoloradO
Посмотреть сообщение
Код:
native SendClientCheck(playerid, actionid, memaddr, memOffset, bytesCount);

public OnPlayerRequestClass(playerid, classid)
{
	SendClientCheck(playerid, 0x2, 0, 0, 4);
  	return 1;
}

const ClientCheck = 103;

IRPC:ClientCheck(playerid, BitStream:bs)
{
	new addr, len;

	BS_ReadValue(bs, PR_UINT8, len,PR_INT32, addr);

	if ((addr & 0xFC0000) != 0xFC0000)
	{
		SendClientMessage(playerid, -1, "****** detected!");

		Kick(playerid);
	}
	return 1;
}
Why does this detect innocents sometimes?
The answer should be pretty obvious: the "innocents" alter the addresses you are checking, so either they are modifying it or those addresses are universally used.
Reply

Added links to tutorials (by Jelly23) in the topic.
Reply

Can I receive Weapon Data sync packets with this plugin?

Now I use GetPlayerWeaponData() in all OnPlayerUpdate(). I want to optimize it using only when it packets to change it receive. Is it possible?
Reply

Hi, I released a FS to disable KEY_FIRE and KEY_ACTION (Secondary Fire) from vehicle ids you specify, so you can use vehicles like Sea Sparrow or Hunter without its weapons.

https://sampforum.blast.hk/showthread.php?tid=646000

Wanted to say thanks for making that possible!
Reply

Good time of day. Is it possible to work with cartridges for weapons?
Reply

Can I check the vehicle's quaternion? I can't see in the enum but I want to be sure.
Reply

Quote:
Originally Posted by zsoolt997
Посмотреть сообщение
Can I check the vehicle's quaternion? I can't see in the enum but I want to be sure.
Код:
enum PR_InCarSync
{
    PR_vehicleId,
    PR_lrKey,
    PR_udKey,
    PR_keys,
    Float:PR_quaternion[4],
    Float:PR_position[3],
    Float:PR_velocity[3],
    Float:PR_vehicleHealth,
    PR_playerHealth,
    PR_armour,
    PR_weaponId,
    PR_additionalKey,
    PR_sirenState,
    PR_landingGearState,
    PR_trailerId,
    Float:PR_trainSpeed
};
Reply

Ohh.. I may be blind Thanks
Reply

The best plugin since release of ColAndreas. Really good job!
Reply

Quote:
Originally Posted by NaS
Посмотреть сообщение
The best plugin since release of ColAndreas. Really good job!
Yeah it is really neat.

I really wonder if this could be combined with Bullet Physics in a way for improving server sided physics streaming.
Reply

Hi,

i hope someone here can help me with the following issue:

I would like to play around with some RPCs, here is a list of all available RPCs:
https://github.com/P3ti/RakSAMP/blob...MP/SAMPRPC.cpp

E.g. i would like to get this one to work:
PHP код:
        const RPC_InitGame 139;
        new 
BitStream:bsx BS_New();
        
BS_WriteValue(
            
bsx,
            
PR_STRING"xx.xx.xx.xx:xxxx"//server IP?
            
PR_STRING"xxxxxx" // server name?
                    //more...??
        
);
        
BS_RPC(bsxplayeridRPC_InitGamePR_HIGH_PRIORITYPR_RELIABLE_ORDERED);
        
BS_Delete(bsx); 
But the problem is im only assuming the expected params, thats why i can not get it to work as i dont knwo them.
Is there a possibility to check what parameters in the stream are expected for the RPCs somewhere?
Reply

Quote:
Originally Posted by PawnoQ
Посмотреть сообщение
Hi,

i hope someone here can help me with the following issue:

I would like to play around with some RPCs, here is a list of all available RPCs:
https://github.com/P3ti/RakSAMP/blob...MP/SAMPRPC.cpp

E.g. i would like to get this one to work:
PHP код:
        const RPC_InitGame 139;
        new 
BitStream:bsx BS_New();
        
BS_WriteValue(
            
bsx,
            
PR_STRING"xx.xx.xx.xx:xxxx"//server IP?
            
PR_STRING"xxxxxx" // server name?
                    //more...??
        
);
        
BS_RPC(bsxplayeridRPC_InitGamePR_HIGH_PRIORITYPR_RELIABLE_ORDERED);
        
BS_Delete(bsx); 
But the problem is im only assuming the expected params, thats why i can not get it to work as i dont knwo them.
Is there a possibility to check what parameters in the stream are expected for the RPCs somewhere?
That RPC will (Re)initialise the client, there is a lot of parameters:

https://github.com/NarutoUA/RakSAMP/...netrpc.cpp#L82
https://github.com/IllidanS4/YSF/blo...erver.cpp#L762

You can also use this list for other RPC parameters, although it is doesn't include all of them for now: https://github.com/Jelly23/RPC-List/wiki/RPC-List
Reply

@Jelly23: thank you!

Although i can not get it to work...
Could you give me an example on how to use a parameter?
Are they optional or do i have to provide all of them when sending this particular InitGame RPC?

EDIT:
When send the RPC_InitGame i always get the server message "Connected to".
How can i provide the actual server hostname as param?
I tried to provide different streams in the stream but i just can not get it to work.
Could someone show me how to do this one?
I bet after one example ill be able to figure the rest out myself.

Thanks!
Reply

Look at my signature for a tutorial. If you arent able to do it after, then you have to lean about C a bit more.
Reply

I'm trying to get "vehicles informations" by using this plugin.
This code result some crazy outputs, ahah. Only the vehicle's id and model id is valid.
Any tips? I'm still learning how to use this plugin.
PHP код:
hook OnOutcomingRPC(playeridrpcidBitStream:bs)
{
    if(
rpcid == 164)
    {
        new 
Float:x,
            
Float:y,
            
Float:z,
            
Float:angle,
            
vehicleid,
            
modelid,
            
respawn_time,
            
color1,
            
color2,
            
siren;
        
BS_ReadValue(bs
            
PR_UINT16vehicleid,
            
PR_UINT16modelid,
            
PR_FLOATx,
            
PR_FLOATy,
            
PR_FLOATz,
            
PR_FLOATangle,
            
PR_UINT16respawn_time,
            
PR_UINT16siren,
            
PR_UINT16color1,
            
PR_UINT16color2);
        
BS_ResetReadPointer(bs);
        
SCMF(playerid, -1"%i & %i & %f & %f & %f & %f & %i & %i & %i & %i"vehicleid,
            
modelid,
            
x,
            
y,
            
z,
            
angle,
            
respawn_time,
            
siren,
            
color1,
            
color2);
        
    }
    return 
Y_HOOKS_CONTINUE_RETURN_1;

Код:
[14:48:16] 1 & 411 & 0.000000 & 1826781696.000000 & 0.000000 & 0.000000 & 16069 & 257 & 20480 & 18243
[14:48:16] 2 & 560 & -0.000000 & -0.000000 & -0.000000 & 0.000000 & 16069 & 1027 & 16384 & 17692
[14:48:16] 3 & 416 & -0.000000 & 0.000000 & 0.000000 & 898666432.000000 & 17331 & 27181 & 32768 & 17595
[14:48:16] 4 & 411 & 0.000000 & 0.000000 & 0.000000 & 0.000000 & 16069 & 3946 & 16384 & 17948
[14:48:16] 5 & 411 & 1073741824.000000 & 0.000000 & 0.000000 & -0.000000 & 16671 & 0 & 32768 & 17595
[14:48:16] 6 & 411 & 964689920.000000 & 7398010.000000 & 0.438015 & -0.000000 & 17307 & 15765 & 32768 & 17595
[14:48:16] 7 & 411 & -0.000000 & 0.000000 & 8.391489 & 2.410292 & 16892 & 11140 & 0 & 17530
[14:48:16] 8 & 411 & -0.000000 & 0.000000 & 1.384874 & 0.000000 & 17326 & 9799 & 32768 & 17595
[14:48:16] 9 & 489 & 0.000000 & -0.000000 & -..*0.-,.,.000000 & 0.000000 & 17300 & 22317 & 32768 & 17595
[14:48:16] 10 & 490 & 0.000000 & 0.000000 & -0.000000 & 0.000000 & 17271 & 36176 & 32768 & 17595
[14:48:16] 11 & 490 & -14720.000000 & -0.000000 & -0.000000 & 0.000000 & 17311 & 5703 & 32768 & 17595
[14:48:16] 12 & 490 & -503808.000000 & -107882384.000000 & -0.000000 & -+''*-(+.(.000000 & 17123 & 31323 & 32768 & 17595
[14:48:16] 13 & 490 & ./,),(-*,(.000000 & 0.000000 & -0.000000 & -395793.906250 & 17035 & 10586 & 32768 & 17595
[14:48:16] 14 & 487 & -0.000000 & 0.000000 & -0.000000 & -0.000000 & 17326 & 35 & 32768 & 17595
[14:48:16] 15 & 520 & 0.000000 & 0.000000 & 0.000000 & 0.000000 & 17290 & 24143 & 16384 & 17948
[14:48:16] 16 & 551 & 0.000000 & -0.000000 & 0.000000 & -0.000000 & 17260 & 21552 & 32768 & 17595
EDIT: Plus, what integer type I should put for retrieved or writing data? How can I know that?
Reply

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
I'm trying to get "vehicles informations" by using this plugin.
This code result some crazy outputs, ahah. Only the vehicle's id and model id is valid.
Any tips? I'm still learning how to use this plugin.
PHP код:
hook OnOutcomingRPC(playeridrpcidBitStream:bs)
{
    if(
rpcid == 164)
    {
        new 
Float:x,
            
Float:y,
            
Float:z,
            
Float:angle,
            
vehicleid,
            
modelid,
            
respawn_time,
            
color1,
            
color2,
            
siren;
        
BS_ReadValue(bs
            
PR_UINT16vehicleid,
            
PR_UINT16modelid,
            
PR_FLOATx,
            
PR_FLOATy,
            
PR_FLOATz,
            
PR_FLOATangle,
            
PR_UINT16respawn_time,
            
PR_UINT16siren,
            
PR_UINT16color1,
            
PR_UINT16color2);
        
BS_ResetReadPointer(bs);
        
SCMF(playerid, -1"%i & %i & %f & %f & %f & %f & %i & %i & %i & %i"vehicleid,
            
modelid,
            
x,
            
y,
            
z,
            
angle,
            
respawn_time,
            
siren,
            
color1,
            
color2);
        
    }
    return 
Y_HOOKS_CONTINUE_RETURN_1;

Код:
[14:48:16] 1 & 411 & 0.000000 & 1826781696.000000 & 0.000000 & 0.000000 & 16069 & 257 & 20480 & 18243
[14:48:16] 2 & 560 & -0.000000 & -0.000000 & -0.000000 & 0.000000 & 16069 & 1027 & 16384 & 17692
[14:48:16] 3 & 416 & -0.000000 & 0.000000 & 0.000000 & 898666432.000000 & 17331 & 27181 & 32768 & 17595
[14:48:16] 4 & 411 & 0.000000 & 0.000000 & 0.000000 & 0.000000 & 16069 & 3946 & 16384 & 17948
[14:48:16] 5 & 411 & 1073741824.000000 & 0.000000 & 0.000000 & -0.000000 & 16671 & 0 & 32768 & 17595
[14:48:16] 6 & 411 & 964689920.000000 & 7398010.000000 & 0.438015 & -0.000000 & 17307 & 15765 & 32768 & 17595
[14:48:16] 7 & 411 & -0.000000 & 0.000000 & 8.391489 & 2.410292 & 16892 & 11140 & 0 & 17530
[14:48:16] 8 & 411 & -0.000000 & 0.000000 & 1.384874 & 0.000000 & 17326 & 9799 & 32768 & 17595
[14:48:16] 9 & 489 & 0.000000 & -0.000000 & -..*0.-,.,.000000 & 0.000000 & 17300 & 22317 & 32768 & 17595
[14:48:16] 10 & 490 & 0.000000 & 0.000000 & -0.000000 & 0.000000 & 17271 & 36176 & 32768 & 17595
[14:48:16] 11 & 490 & -14720.000000 & -0.000000 & -0.000000 & 0.000000 & 17311 & 5703 & 32768 & 17595
[14:48:16] 12 & 490 & -503808.000000 & -107882384.000000 & -0.000000 & -+''*-(+.(.000000 & 17123 & 31323 & 32768 & 17595
[14:48:16] 13 & 490 & ./,),(-*,(.000000 & 0.000000 & -0.000000 & -395793.906250 & 17035 & 10586 & 32768 & 17595
[14:48:16] 14 & 487 & -0.000000 & 0.000000 & -0.000000 & -0.000000 & 17326 & 35 & 32768 & 17595
[14:48:16] 15 & 520 & 0.000000 & 0.000000 & 0.000000 & 0.000000 & 17290 & 24143 & 16384 & 17948
[14:48:16] 16 & 551 & 0.000000 & -0.000000 & 0.000000 & -0.000000 & 17260 & 21552 & 32768 & 17595
EDIT: Plus, what integer type I should put for retrieved or writing data? How can I know that?
PHP код:
hook OnOutcomingRPC(playeridrpcidBitStream:bs)
{
    if(
rpcid == 164)
    {
        new
            
Float:x,
            
Float:y,
            
Float:z,
            
Float:angle,
            
vehicleid,
            
modelid,
            
InteriorColor1,
            
InteriorColor2,
            
Float:health,
            
interior,
            
DoorDamageStatus,
            
PanelDamageStatus,
            
LightDamageStatus,
            
tireDamageStatus,
            
addsiren,
            
mods,
            
PaintJob,
            
BodyColor1,
            
BodyColor2;
        
BS_ReadValue(
            
bs,
            
PR_INT16vehicleid,
            
PR_INT32modelid,
            
PR_FLOATx,
            
PR_FLOATy,
            
PR_FLOATz,
            
PR_FLOATangle,
            
PR_INT8InteriorColor1,
            
PR_INT8InteriorColor2,
            
PR_FLOAThealth,
            
PR_INT8interior,
            
PR_INT32DoorDamageStatus,
            
PR_INT32PanelDamageStatus,
            
PR_INT8LightDamageStatus,
            
PR_INT8tireDamageStatus,
            
PR_INT8addsiren
        
);
        
        
printf("%i %i %f %f %f %f %i %i %f %i %i %i %i %i %i"vehicleidmodelidxyzangleInteriorColor1InteriorColor2healthinteriorDoorDamageStatusPanelDamageStatusLightDamageStatustireDamageStatusaddsiren);
        
        for (new 
014a++)
        {
            
BS_ReadValue(bsPR_INT8mods);
            
printf("Mod Slot %i: %i",amods);
        }
        
        
BS_ReadValue(
            
bs,
            
PR_INT8PaintJob,
            
PR_INT32BodyColor1,
            
PR_INT32BodyColor2
        
);
        
        
printf("%i %i %i",PaintJobBodyColor1BodyColor2);
        
BS_ResetReadPointer(bs);
    }
    return 
Y_HOOKS_CONTINUE_RETURN_1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)