CLEO Help car engine state sync

CLEO related
Status
Not open for further replies.

mrsaxobit

Member
Joined
Feb 5, 2014
Messages
23
Reaction score
0
Hey, would that be possible to send car packet data to set an engine off? example a player is driving, and i send a fake packet im driving that car but engine off, and he would suddently stop driving?

how would i do it with car info data sync?

whats the offset value and block to use to do that by using this struct? thanks

PACKET_VEHICLE_SYNC = 200 | +201
// struct stInCarData ( size =63)
// uint16_t sVehicleID;
// uint16_t sLeftRightKeys;+2
// uint16_t sUpDownKeys;+4
// uint16_t sKeys;+6
// float fQuaternion[4];+8
// float fPosition[3];+24
// float fMoveSpeed[3];+36
// float fVehicleHealth;+48
// uint8_t bytePlayerHealth;+52
// uint8_t byteArmor;+53
// uint8_t byteCurrentWeapon;+54
// uint8_t byteSiren;+55
// uint8_t byteLandingGearState;+56
// uint16_t sTrailerID;+57
// float fTrainSpeed;+59
 

4changesLeft

Well-known member
Joined
Apr 10, 2015
Messages
365
Reaction score
3
You could just do it by turning the engine off with script and then send car sync packets, that's the simplest way :p
 

4changesLeft

Well-known member
Joined
Apr 10, 2015
Messages
365
Reaction score
3
mrsaxobit said:
yes my problem is specifically disabling the engine of a car ID, the problem is if someone is driving it too

There is no difference if someone is driving or not.. you just get the car handle from the car id and then do the magic
 

mrsaxobit

Member
Joined
Feb 5, 2014
Messages
23
Reaction score
0
TehArgis said:
You could just do it by turning the engine off with script and then send car sync packets, that's the simplest way :p

mrsaxobit said:
yes my problem is specifically disabling the engine of a car ID, the problem is if someone is driving it too

how would i sync his engine state if the car data has no offset for it? if i "client side" disable the engine (in my screen) and then i send the packet to sync the car it will already be too late because he already "synced" the previous state of the engine which was on. idk if you get what i mean
 

4changesLeft

Well-known member
Joined
Apr 10, 2015
Messages
365
Reaction score
3
mrsaxobit said:
how would i sync his engine state if the car data has no offset for it? if i "client side" disable the engine (in my screen) and then i send the packet to sync the car it will already be too late because he already "synced" the previous state of the engine which was on. idk if you get what i mean
I guess that's always a problem when you want to sync a car without being a driver in it, in general syncing with packets can be really buggy, that's why i dont prefer it.. What I would do is put me in the car, turn the engine off and get out. But that's also a problem if the server has protection :p
 

mrsaxobit

Member
Joined
Feb 5, 2014
Messages
23
Reaction score
0
i found a piece of code that i'd continuously set the instant speed of the vehicle to 0.0 and it would appear frozen. but however the server detects changing between vehicles all the time but thats not the problem, what i'd like to do is to be able to do that even if just on foot, but when on foot it appears im teleporting into his vehicle? i tried hook off onfoot data but still same result.. Any idea to work around as that engine thing seems not possible?
 

4changesLeft

Well-known member
Joined
Apr 10, 2015
Messages
365
Reaction score
3
mrsaxobit said:
i found a piece of code that i'd continuously set the instant speed of the vehicle to 0.0 and it would appear frozen. but however the server detects changing between vehicles all the time but thats not the problem, what i'd like to do is to be able to do that even if just on foot, but when on foot it appears im teleporting into his vehicle? i tried hook off onfoot data but still same result.. Any idea to work around as that engine thing seems not possible?

"a piece of code" you mean my freeze script? xD Yes teleporting in to a car onfoot even with packets is gonna eject the driver, so the best away is to first enter as passenger (send car passenger sync) and then send the driver sync. But this works only one time, if you try to do it rapidly, it's still gonna eject the driver
 
Status
Not open for further replies.
Top