Desyncing bullets - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Desyncing bullets (
/showthread.php?tid=588454)
Desyncing bullets -
DTV - 09.09.2015
Is there a way to "desync" bullets, so that when someone fires a bullet at someone, it doesn't register for the one who gets hit and does no damage?
Re: Desyncing bullets -
Abagail - 09.09.2015
If your running in lagcompmode enabled simply return 0 in OnPlayerWeaponShot or otherwise you could TRY using OnPlayerUpdate for this to stop the updates from being synced but it probably wouldn't be very sufficient.
E.g:
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float: fX, Float: fY, Float: fZ)
{
if(!IsPlayerConnected(playerid)) return true;
if(hittype == BULLET_HIT_TYPE_PLAYER)
{
if(weaponid == 38 && !IsPlayerAdmin(playerid))
{
return 0;
}
}
return 1;
}
This example desyncs / drops any bullet data from a minigun weapon if the player isn't logged into RCON.
Re: Desyncing bullets -
DTV - 10.09.2015
Ah I thought it would be more complicated, I guess not lol. Thanks for the help.