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 |
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; }
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; }
Код:
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; } |
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 };
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(bsx, playerid, RPC_InitGame, PR_HIGH_PRIORITY, PR_RELIABLE_ORDERED);
BS_Delete(bsx);
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 код:
Is there a possibility to check what parameters in the stream are expected for the RPCs somewhere? |
hook OnOutcomingRPC(playerid, rpcid, BitStream:bs)
{
if(rpcid == 164)
{
new Float:x,
Float:y,
Float:z,
Float:angle,
vehicleid,
modelid,
respawn_time,
color1,
color2,
siren;
BS_ReadValue(bs,
PR_UINT16, vehicleid,
PR_UINT16, modelid,
PR_FLOAT, x,
PR_FLOAT, y,
PR_FLOAT, z,
PR_FLOAT, angle,
PR_UINT16, respawn_time,
PR_UINT16, siren,
PR_UINT16, color1,
PR_UINT16, color2);
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
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 код:
Код:
[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 |
hook OnOutcomingRPC(playerid, rpcid, BitStream: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_INT16, vehicleid,
PR_INT32, modelid,
PR_FLOAT, x,
PR_FLOAT, y,
PR_FLOAT, z,
PR_FLOAT, angle,
PR_INT8, InteriorColor1,
PR_INT8, InteriorColor2,
PR_FLOAT, health,
PR_INT8, interior,
PR_INT32, DoorDamageStatus,
PR_INT32, PanelDamageStatus,
PR_INT8, LightDamageStatus,
PR_INT8, tireDamageStatus,
PR_INT8, addsiren
);
printf("%i %i %f %f %f %f %i %i %f %i %i %i %i %i %i", vehicleid, modelid, x, y, z, angle, InteriorColor1, InteriorColor2, health, interior, DoorDamageStatus, PanelDamageStatus, LightDamageStatus, tireDamageStatus, addsiren);
for (new a = 0; a < 14; a++)
{
BS_ReadValue(bs, PR_INT8, mods);
printf("Mod Slot %i: %i",a, mods);
}
BS_ReadValue(
bs,
PR_INT8, PaintJob,
PR_INT32, BodyColor1,
PR_INT32, BodyColor2
);
printf("%i %i %i",PaintJob, BodyColor1, BodyColor2);
BS_ResetReadPointer(bs);
}
return Y_HOOKS_CONTINUE_RETURN_1;
}