SA-MP Forums Archive
IR and NV Goggles bug? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IR and NV Goggles bug? (/showthread.php?tid=166900)



IR and NV Goggles bug? - DaneAMattie - 10.08.2010

When i have night view goggles or infrared goggles on my samp server and when i enabled my nightview (or IR) then everyone in the server would have that view :S can i fix this somehow?, i've seen some servers with a fix but i have no idea how.


Thanks,

DaneAMattie


Re: IR and NV Goggles bug? - Hiddos - 10.08.2010

Never seen a fix, you might use OnPlayerUpdate or something like it, to not sync him with the other players. I'm unsure if new players streaming also have the effect.


Re: IR and NV Goggles bug? - DaneAMattie - 10.08.2010

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Never seen a fix, you might use OnPlayerUpdate or something like it, to not sync him with the other players. I'm unsure if new players streaming also have the effect.
New players wont see the effect if i have it on but if i turn it off and on again they will


Re: IR and NV Goggles bug? - Snipa - 10.08.2010

Yeah i doubt you can fix it, i saw on one server it worked 50% of the time but when someone laged with them on, the whole server would see with night vision/


Re: IR and NV Goggles bug? - Hiddos - 10.08.2010

Quote:
Originally Posted by DaneAMattie
Посмотреть сообщение
New players wont see the effect if i have it on but if i turn it off and on again they will
Then you could try to change his position to someplace far away from others for 1-2 seconds and place him back


Re: IR and NV Goggles bug? - DaneAMattie - 10.08.2010

Ill try that code and maybe i can make a fix


Re: IR and NV Goggles bug? - DaneAMattie - 18.08.2010

Quote:
Originally Posted by ICECOLDKILLAK8
Посмотреть сообщение
Heres a fix, only downside is that players won't see other players wearing goggles, just holding them (Although im guesssing exactly the same thing would happen if they put them on whilst streamed out, so i guess theres no worry there).
Put this in OnPlayerUpdate:
Код:
new weapon = GetPlayerWeapon(playerid);

if(weapon == 44 || weapon == 45)
{
    new keys, ud, lr;
    GetPlayerKeys(playerid, keys, ud, lr);

    if(keys & KEY_FIRE)
    {
        return 0;
    }
}
cool it works, thanks