0x32789
Expert
Hi, I'm trying to send fake bullets to a player, Whenever this function is called, It dosent give fake bullet to him, I used showcallbacks in ugbase.eu cheating allowed
I dont remember what it debugged but it said something like 255 and 0.0 all coords and illegal chars like (*!
Are my offsets wrong or what? Why does it not send it properly?
I dont remember what it debugged but it said something like 255 and 0.0 all coords and illegal chars like (*!
Code:
void RakClient::SendFakeBulletToPlayer( int PlayerID )
{
if ( !pRakClient )
return;
actor_info *self = actor_info_get(ACTOR_SELF, NULL);
actor_info *target = getGTAPedFromSAMPPlayerID(PlayerID);
if(self == NULL && target == NULL) return;
if(g_Players->iIsListed[PlayerID] != 1) return;
stBulletData bsSync;
memset(&bsSync, 0, sizeof(stBulletData));
bsSync.byteType = (BYTE)1;
bsSync.sTargetID = PlayerID;
vect3_copy(&self->base.matrix[4 * 3], bsSync.fOrigin);
vect3_copy(&target->base.matrix[4 * 3], bsSync.fTarget);
vect3_copy(&target->base.matrix[4 * 3], bsSync.fCenter);
BitStream bsSend;
bsSend.Write((BYTE)ID_BULLET_SYNC);
bsSend.Write((PCHAR)&bsSync, sizeof(stBulletData));
pRakClient->Send(&bsSend, HIGH_PRIORITY, UNRELIABLE_SEQUENCED, 0);
}
Are my offsets wrong or what? Why does it not send it properly?