NightVision & Thermal Goggles
#1

How can I do that the goggles doesn't show up at all players but only on the player who have the goggle ?
Reply
#2

As far as I know, they're pretty damned bugged, if they even work.
Reply
#3

Quote:
Originally Posted by IcyBlight
As far as I know, they're pretty damned bugged, if they even work.
I saw it on few servers that players has NightVision Goggles and they work only for the player.
Reply
#4

There's a released script to fix it on the forums.
Reply
#5

Quote:
Originally Posted by Grim_
There's a released script to fix it on the forums.
There is? I just searched, and only found a fake one- Same thing basically, but it's fake nonetheless.
Reply
#6

This works, tested it myself:
pawn Code:
#include <a_samp>

public OnPlayerUpdate(playerid)
{
    switch(GetPlayerWeapon(playerid))
    {
      case 44, 45:
      {
        new keys, ud, lr;
        GetPlayerKeys(playerid, keys, ud, lr);
        if((keys & KEY_FIRE) && (!IsPlayerInAnyVehicle(playerid)))
            {
              return 0;
            }
        }
    }
    return 1;
}
Reply
#7

Quote:
Originally Posted by Grim_
This works, tested it myself:
pawn Code:
#include <a_samp>

public OnPlayerUpdate(playerid)
{
    switch(GetPlayerWeapon(playerid))
    {
      case 44, 45:
      {
        new keys, ud, lr;
        GetPlayerKeys(playerid, keys, ud, lr);
        if((keys & KEY_FIRE) && (!IsPlayerInAnyVehicle(playerid)))
            {
              return 0;
            }
        }
    }
    return 1;
}
Interesting, thank you.
Reply
#8

Quote:
Originally Posted by Sky4D
Quote:
Originally Posted by Grim_
This works, tested it myself:
pawn Code:
#include <a_samp>

public OnPlayerUpdate(playerid)
{
    switch(GetPlayerWeapon(playerid))
    {
      case 44, 45:
      {
        new keys, ud, lr;
        GetPlayerKeys(playerid, keys, ud, lr);
        if((keys & KEY_FIRE) && (!IsPlayerInAnyVehicle(playerid)))
            {
              return 0;
            }
        }
    }
    return 1;
}
Interesting, thank you.
And then only I see my goggle ?
Reply
#9

Quote:
Originally Posted by Headshot1108
Quote:
Originally Posted by Sky4D
Quote:
Originally Posted by Grim_
This works, tested it myself:
pawn Code:
#include <a_samp>

public OnPlayerUpdate(playerid)
{
    switch(GetPlayerWeapon(playerid))
    {
      case 44, 45:
      {
        new keys, ud, lr;
        GetPlayerKeys(playerid, keys, ud, lr);
        if((keys & KEY_FIRE) && (!IsPlayerInAnyVehicle(playerid)))
            {
              return 0;
            }
        }
    }
    return 1;
}
Interesting, thank you.
And then only I see my goggle ?
Think so, and i think it should also work under OnPlayerKeyStateChange. All in all it's okay like that but i think it would be better to put it under OnPlayerKeyStateChange, because it's not called as often as OnPlayerUpdate, but that's your decision.
Reply
#10

Quote:
Originally Posted by DeathOnaStick
Think so, and i think it should also work under OnPlayerKeyStateChange. All in all it's okay like that but i think it would be better to put it under OnPlayerKeyStateChange, because it's not called as often as OnPlayerUpdate, but that's your decision.
OnPlayerUpdate must return 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)