According to me whole code is wrong....
Nice idea but some mistakes...
You say "OffSet" but its coords of bullet hit...
It worked for you beacuse you must have tested it in Blue berry farm which coords are 0.0,0.0,0.0 the code u used will work there and that not accurate
use this one instead --
pawn Code:
public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
{
if( hittype == BULLET_HIT_TYPE_PLAYER ) // Bullet Crashing uses just this hittype
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
fX = pos[0] <= fX ? fX-pos[0] : fX+pos[0];
fY = pos[1] <= fY ? fY-pos[1] : fY+pos[1];
fZ= pos[2] <= fZ ? fZ-pos[2] : fZ+pos[2];
if( !( -20.0 <= fX <= 20.0 ) || !( -20.0 <= fY <= 20.0 ) || !( -20.0 <= fZ <= 20.0 ) ) // a valid offset, it's impossible that a offset bigger than 20 is legit (also less than -20.0 is impossible, not used by this hack, but still, let's check for it, just for the future, who knows what hacks will appear)
{
/*
If you want, here you can kick the cheater
*/
return 0; // let's desynchronize that bullet, so players won't crash
}
}
return 1;
}
Code needs to be tested though*
Correct me if i am wrong.....