CLEO Help Quit game upon any health change from server & spec prevention

CLEO related
Status
Not open for further replies.

ChampaRando

Active member
Joined
Jan 17, 2020
Messages
62
Reaction score
3
Location
INDIA
Hey lads! I thought of an idea to kind of avoid admin's checking for hacks.
In the server I play, most admins use a command (on any type of hack amazingly) that quickly changes few parameters of a player to check if they hack. One of them is always dropping health by a random amount.

I was thinking, is there a way to keep an eye out for that. If ANY TIME the health drops of my player (this server has server-sided Health anyways which is SYNCED to my local health bar, so should work with cleo), the cleo quits my game and avoids a ban (before the check completes).

I found this;
0AA5: call 8535003 3 pop 3 0 0 0 // - QUIT GAME
((credit to blvck_0v for this)).

But do we have an opcode to detect any HP change? I know one way, maybe store current health in a variable then after anytime HP drops, call the opcode above. So I would make this toggle-able as well (ik how to do that so all good). Just wondering any cool OPCODEs that exist to detect HP change or best way is to store in a var upon toggle and then check upon any HP change.
 

ChampaRando

Active member
Joined
Jan 17, 2020
Messages
62
Reaction score
3
Location
INDIA
Nevermind i made it work

Also is it possible to get another player's location coords with their ID? I am just trying all I can to detect whenever an admin spectates me and then I /q right that moment (asap/automatically).
 
Last edited:

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Instead of
wait 100 ms
Use
Wait 0 ms


If you have SAMPFUNCS with you, you can intercept raknet rpc data:

RPC_SCRSETPLAYERARMOUR = 66
Which detects if the server forces you to change your actor's armour

And
RPC_SCRSETPLAYERHEALTH = 14
Which detects if the server forces you to change your actor's health
 

ChampaRando

Active member
Joined
Jan 17, 2020
Messages
62
Reaction score
3
Location
INDIA
Instead of
wait 100 ms
Use
Wait 0 ms


If you have SAMPFUNCS with you, you can intercept raknet rpc data:

RPC_SCRSETPLAYERARMOUR = 66
Which detects if the server forces you to change your actor's armour

And
RPC_SCRSETPLAYERHEALTH = 14
Which detects if the server forces you to change your actor's health
Ah cheers cheers that exactly what I wanted.

What about is there any way to get player coordinates? I saw a hack somewhere on youtube once, even on RP servers, where we cant see player on maps, we can find their location and the cleo made a red marker for their last location upon cmd input on map. So it means CLEOs can get someones location right? Any idea what that could be?
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Nevermind i made it work

Also is it possible to get another player's location coords with their ID? I am just trying all I can to detect whenever an admin spectates me and then I /q right that moment (asap/automatically).
Heart of Player finding:
Code:
0B2F: samp get_streamed_out_player_pos 0@ to 1@ 2@ 3@



Detecting if a player is Spectating:
check the aim data of actor to detect if he is spectating somebody using packet struct:
Code:
struct stAimData
{
    BYTE    byteCamMode;
    float    vecAimf1[3]; // <- local coordinate from player actor where his camera is attached
    float    vecAimPos[3]; // <- global coordinate where his camera is looking
    float    fAimZ;
    BYTE    byteCamExtZoom : 6;
    BYTE    byteWeaponState : 2;
    BYTE    bUnk;
};

And do in Cleo:
Code:
alloc 1@ 31
0BBE: samp store_player 0@ aim_data 1@
0C0C: 2@ = struct 1@ offset 1 size 4 // VecAimFx
0C0C: 3@ = struct 1@ offset 5 size 4 // VecAimFy
0C0C: 4@ = struct 1@ offset 9 size 4 // VecAimFz
0C0C: 5@ = struct 1@ offset 13 size 4 // vecAimPosx
0C0C: 6@ = struct 1@ offset 17 size 4  // vecAimPosy
0C0C: 7@ = struct 1@ offset 21 size 4  // vecAimPosz
Free 1@
// Do some comparing...
It is not that easy to explain but this is how I detect if a player is spectating, the bad thing about this method is that it sometimes make false positives that is why there are no genuine spectate detectors .
 

ChampaRando

Active member
Joined
Jan 17, 2020
Messages
62
Reaction score
3
Location
INDIA
Sweet sweet. So say when admins spectate us, would just getting and comparing their position work? My idea is: If their position is around mine, say in a radius of 10 in x/y and maybe a little higher radius in the z range, then I can say they are "specing" me or just nearby me. Anything works, I just feel like anytime admin is nearby (spec/physically), /q asap.

So if I use the spectate function of samp, that sets my camera and does it set the player location as well right? (samp wiki docs is taken down so RIP documentation rn, probs can use wayback machine but eh)
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Sweet sweet. So say when admins spectate us, would just getting and comparing their position work? My idea is: If their position is around mine, say in a radius of 10 in x/y and maybe a little higher radius in the z range, then I can say they are "specing" me or just nearby me. Anything works, I just feel like anytime admin is nearby (spec/physically), /q asap.

So if I use the spectate function of samp, that sets my camera and does it set the player location as well right? (samp wiki docs is taken down so RIP documentation rn, probs can use wayback machine but eh)
Yes just like that. But like I said it can cause false positives. In your case of instant quitting gta sa is a bit frustrating when a false positive is triggered.

It would be best if it informs you first and then you manually quit the game instead of letting the Cleo script to quit your game.
 

ChampaRando

Active member
Joined
Jan 17, 2020
Messages
62
Reaction score
3
Location
INDIA
Right Right, so bcuz I am not the guru of CLEO programming/C++ just yet (just learnt Java, JS, Python this year) so I will first try with the checking if admin is nearby me and then /q.
I can live with the false positives because I am thinking to leave my account ON while I am AFK for money farming right. Then even if I do get a couple of false positives here and there, it's fine for me because I am running low on VPN IPs now. So, saving a ban is my biggest concern.

Could I do: Get nearby player ID (say in a radius of 50 50 50), if I find any ID: /q else wait 1000msec, retry. Or would this fail since specing is not physically being there/streamed in? Probably with the OPCODE https://gtagmodding.com/opcode-database/opcode/0AB5/

ALSO: Is a player spectating in SAMP fundamentally different from someone who's physically right next to me? Like if my logic: "IF ANY PLAYER NEARBY" works, does samp treat spectating player's location differently or is it fundamentally the same?

My bad for asking 4 5 questions. Just trying to find the most efficient method to prevent some sort of bans.
 
Last edited:

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
ALSO: Is a player spectating in SAMP fundamentally different from someone who's physically right next to me? Like if my logic: "IF ANY PLAYER NEARBY" works, does samp treat spectating player's location differently or is it fundamentally the same?

Player spectating is like this:
But that mod is limited on streamed player's only,but Combined with admin priviledges, admins are allowed to spectate player's anywhere even streamed out player's since they can command the server to forcefully stream your actor on their gta sa.

So basically, player spectating does not need the admin's actor to inspect another location. They can see you whenever they want even if they don't use their actor to leave in one place. They just attach their camera towards their target player's actor to see what is happening. That is why I suggested to examine their aim sync data since this has the camera positions data of that player.

Could I do: Get nearby player ID (say in a radius of 50 50 50), if I find any ID: /q else wait 1000msec, retry. Or would this fail since specing is not physically being there/streamed in? Probably with the OPCODE https://gtagmodding.com/opcode-database/opcode/0AB5/
But if you are confident that admins pops up out of nowhere (like instant teleporting near you) and does not use spectating method, then this idea will work.


I am thinking to leave my account ON while I am AFK for money farming right.
If you are using bots to farm money then admins will have hard time judging if you are bot farming or not.
 
Last edited:

ChampaRando

Active member
Joined
Jan 17, 2020
Messages
62
Reaction score
3
Location
INDIA
Ah right right. So the server has dogshit anti cheat. I have actually farmed over 2 million. The bug is to teleport after 15 second, if we teleport within 15 seconds of the checkpoint appearing, server bans, else it doesnt. I have used it for months (dogshit to the scripter lmao).
Only issue is: I randomly get banned. I have appealed those bans sometimes and I find out its by admins for "TP HACK". I get banned every few hrs or so (I believe admins randomly /spec players every few hrs, and in a pool of 50 or so players, I eventually become the player to spectate - my theory, cuz if server is giving warnings, I wouldnt surive 25 hrs hacking, even with 10 admins on).
So I was just thinking to quit the game, any time an admin specs me, to prevent running out of VPN IPs.

**PS: Yes "hacking" or "farming" is unethical, but lots of players do it there, and the server has retarded infalted economy, but jobs in the server suck in pay. So players are left with no choice to either hack or donate IRL to get IG cash lmao. Honestly, if the server had a fair payrate of jobs, I wouldnt even bother hacking.**
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
297
Reaction score
103
Location
UGBASE
Im sure all those aim-data are absolutely senseless. If someone spectates you, there is no PED created for you, neither you will receive any relevant packet-updates from that player.

There is no possibility to create a reliable way to detect spectators.
 

ChampaRando

Active member
Joined
Jan 17, 2020
Messages
62
Reaction score
3
Location
INDIA
Im sure all those aim-data are absolutely senseless. If someone spectates you, there is no PED created for you, neither you will receive any relevant packet-updates from that player.

There is no possibility to create a reliable way to detect spectators.
Right right. Reckon you have any ideas on what can be done to avoid getting stuck with random spec checking?
I do not mind the method failing to false positives, or having a harsh approach, just want to preserve 5 6 leftover VPN IPs.

Anti cheat in the server sucks (actually it's very clever in many advanced areas, but somehow, it sucks in detecting TP LMAO). So my method to teleport is to teleport to a checkpoint and return back in 500 miliseconds (to where I started). Now see, this is random as well. I tried walking up to my auto TP player (via other accounts/PC to see what it felt like for other's screen). In some player's screen, when I quickly TP back and forth, in their screen sometimes the TP player NEVER moves at all (while in some other player's screen it does). Then next time, it will move and then few times it won't. Due to this fast TP method, I'm guessing again, not reliable 100% (probably due to many factors such as broadband latency/ping, game ping etc.) but it saves me a few times. But the main issue is when admins randomly spec me, I will eventually be caught because of that fast TP, I eventually do disappear for 1 second in their screen (or actually if they specing me, will they see me go to a new location for 500 millsecond too? Idk actually, what do u guys think? I never tried /spec in that server so XD).
Hence why I get caught so randomly. Sometimes I can survive 25 hrs, sometimes not even 10 minutes. Any ideas of at least minimising this chance of ban a tad bit more?
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
297
Reaction score
103
Location
UGBASE
Because it doesn't matter. Non-phsyical teleport-hacks basically just hook the outgoing localpos-packet (Can't remember which one, didn't touch SA:MP for a long time. But IIRC it was the ID_ONFOOT_SYNC or something like that), modify the position to the checkpoint' pos and return it. The server will obviously detect you as teleporting, as you just travelled to another location according to the incoming packets of the server.

Why some people will see you teleporting and some not, always depends on streaming-speed, internet-speed & updating ped speed. Most likely your body will just float away for extreme short time but head back as you obviously will be re-streamed on your phsyical position.

You are teleporting, it doesn't matter if phsyical or not.
 

ChampaRando

Active member
Joined
Jan 17, 2020
Messages
62
Reaction score
3
Location
INDIA
Because it doesn't matter. Non-phsyical teleport-hacks basically just hook the outgoing localpos-packet (Can't remember which one, didn't touch SA:MP for a long time. But IIRC it was the ID_ONFOOT_SYNC or something like that), modify the position to the checkpoint' pos and return it. The server will obviously detect you as teleporting, as you just travelled to another location according to the incoming packets of the server.

Why some people will see you teleporting and some not, always depends on streaming-speed, internet-speed & updating ped speed. Most likely your body will just float away for extreme short time but head back as you obviously will be re-streamed on your phsyical position.

You are teleporting, it doesn't matter if phsyical or not.
Yes that's exactly what it is! It doesn't use the normal setting player coords and what not, it just moves the CP location in packets (its a hack I got from my mate years ago, got source code too for it). And yeah streaming speed probably is the random-ness.
So any way to prevent (I guess MINIMISE) admin specing and banning? I could potentially pause my game for 15 seconds, and unpause for 1 second before TP, but still that won't do anything as admins will see that random stream in/out in that 1 second. I am flat out of ideas.

If anyone has one, would love to hear it (doubt it XD). I am trying only because, obviously the server knows i am teleporting, but it's not doing anything (im 99% sure it doesn't give warnings either because like I said, I have survived over 25 hours with admins being online, so if it sent warnings, I would've been banned in that time. And anti cheat doesn't do anything anyways in this case so it has to be manual random specing - which I can try fooling a human maybe? To some degree?).
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Im sure all those aim-data are absolutely senseless. If someone spectates you, there is no PED created for you, neither you will receive any relevant packet-updates from that player.

There is no possibility to create a reliable way to detect spectators.
I forgot to mention that,my method on detecting admin spectators needs the admin ped to work since VecAimF is a local coordinate position respect to the player actor pos. Having no ped around will give blank data. So forget I said that and stick to detecting actor position I guess lol xD
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
297
Reaction score
103
Location
UGBASE
And as there is no ped streamed or created for you if you are being spectated, the method is non-working.
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Yes that's exactly what it is! It doesn't use the normal setting player coords and what not, it just moves the CP location in packets (its a hack I got from my mate years ago, got source code too for it). And yeah streaming speed probably is the random-ness.
So any way to prevent (I guess MINIMISE) admin specing and banning? I could potentially pause my game for 15 seconds, and unpause for 1 second before TP, but still that won't do anything as admins will see that random stream in/out in that 1 second. I am flat out of ideas.

If anyone has one, would love to hear it (doubt it XD). I am trying only because, obviously the server knows i am teleporting, but it's not doing anything (im 99% sure it doesn't give warnings either because like I said, I have survived over 25 hours with admins being online, so if it sent warnings, I would've been banned in that time. And anti cheat doesn't do anything anyways in this case so it has to be manual random specing - which I can try fooling a human maybe? To some degree?).
If the server's position checking and comparing of previous position happens during onfootsync,vehiclesync,aimsync. Then there no way on escaping tp detection.

But in your case since you managed to sometimes succeed the TP hack, then I assume that the server might doing the checking in a periodic fashion.

If you find out the proper interval the server checks positions, then you just need to do nothing during that time. Although I don't see any idea how you can figure it out since like you said it can also be randomness of the server
 

ChampaRando

Active member
Joined
Jan 17, 2020
Messages
62
Reaction score
3
Location
INDIA
If the server's position checking and comparing of previous position happens during onfootsync,vehiclesync,aimsync. Then there no way on escaping tp detection.

But in your case since you managed to sometimes succeed the TP hack, then I assume that the server might doing the checking in a periodic fashion.

If you find out the proper interval the server checks positions, then you just need to do nothing during that time. Although I don't see any idea how you can figure it out since like you said it can also be randomness of the server
Nah Nah it's not server that bans me. The server has a 10 second period check to check for TP (I can claim this because I have gotten banned a few times in early stages when I instant TPed. Then I started waiting a few seconds and ANY WAIT after 10 second (or teleporting in increments of 10 seconds or above), is successful. I have spent over 25 hours in one isntance (usually around 2-4 on average). All my bans are by admins manually. So they are mostly spectating (if they got a warning, I wouldnt have survived even 4-25 hrs on most instances).

Successfully escaped anti cheat detection, only thing annoying is admins (and this server has around 2-3 admins at all times minimum - popular russian RP). Can't really think of ideas to fool an admin (in say most of the time, doesn't have to be 100%). Reckon you got an idea to fool an admin or something? (seems unlikely but worth a shot lmao)

The randomoness I am talking about is my bans by admins. So sometimes I get lucky to survive hours, sometimes minutes. All bans by admins. So this has to be admin randomly specing players right? 99% sure server doesnt do anything (and yeah I TP in increments of 15+ seconds)
 

88resu

Active member
Joined
Oct 1, 2019
Messages
110
Reaction score
46
Location
Uganda
spectate detection isnt possible. point
for that TP detection: get the distance between you and your end point.

divide the distance trough some offset, that will u gain x, y steps of +x /-x / +y/-y
do not teleport huge distances.do it in steps.
easy math

probably the server have check for teleport just if the distance is greater than > 20 / 50 / 100 who knows
 
Last edited:

ChampaRando

Active member
Joined
Jan 17, 2020
Messages
62
Reaction score
3
Location
INDIA
spectate detection isnt possible. point
for that TP detection: get the distance between you and your end point.

divide the distance trough some offset, that will u gain x, y steps of +x /-x / +y/-y
do not teleport huge distances.do it in steps.
easy math

probably the server have check for teleport just if the distance is greater than > 20 / 50 / 100 who knows
Again I doubt the server checks for large distances. I can go teleport to LV from LS (as long as I take over 10+ seconds in checkpoint appearing. All day long - I get NO bans XD). I am certainly sure its admins random specing that bans me
 
Status
Not open for further replies.
Top