After a few hours of work, I have decoded all of CA's "shoot a bullet" message.
Code:
// Fires your gun
// uint8:Unk - Always 0
// uint16:nWeaponID - ID of current weapon
// uint16:nAmmoAmount - Client-side ammo amount XOR current weapon ID
// uint32:nFireTicks - Current client-side tick count
// LTVector:vWeaponPos - (x, y, z) of weapon in world space
// LTVector:vFirePos - (x, y, z) of start point of firing (usually the camera)
// LTRotation:rFireDir - Direction of bullet (in rotation form)
// float:fPlayerYaw - Yaw of client player
// LTVector:vFireDir - Direction of bullet (in vector form)
// uint8:nChecksum - Not sure, some kind of validation value I think
// bool:bIsScopedOrScoping - Is the player scoped or scoping in/out
// bool:Unk - Always false
// bool:bLastShotAltFire - Was alternate fire used for the previous shot?
// uint8:nPerturb - Random distance from center that bullet hits
// float:fMultiplier - Multiplier of something
// uint32:nFireTime - Fire time (nearest second)
// bool:bPlayerHit - Was a player hit
// if (bPlayerHit) {
//// HOBJECT:hHitPlayerObj - Object of hit player
//// HMODELNODE:hHitNode - Node that was hit
//// LTVector:vHitPos - (x, y, z) of position that was hit
//// LTVector:vDirection - Direction the player is in relative to you. Only -1, 0, 1 allowed for each direction
// }
// bool:Unk - Always 0 I think
// bool:bAltFire - Was alternate fire used
// bool:bObjectHit - Was an object hit
// float:fDist - Distance to object
// HOBJECT:hHitObj - Object that was hit
// uint32:nShotCounter - Odd value, not sure what it's meant for
Send a message to the server with the correct message ID and with all that filled out and you can do whatever the hell you want .
There may be a few minor mistakes
Oh and credits to CodeDemon