NV/Thermal goggle 'exploit'
#1

As you may know, when a player uses night vision or thermal goggles the effect is seen on all players' (that are streamed in, I think) screens. This is fixable with this code under OnPlayerUpdate:

pawn Код:
new keys, updown, leftright;
    GetPlayerKeys(playerid, keys, updown, leftright);

    if((GetPlayerWeapon(playerid) == 44 || GetPlayerWeapon(playerid) == 45) && keys & KEY_FIRE && !IsPlayerInAnyVehicle(playerid))
    {
        return 0;
    }
But I have managed to work around this by exploiting something, and make all players see the goggles, and I can't fix it, because you can't detect this certain thing that I did to get around it in SA:MP.

I don't want to publicly announce this 'exploit' as I presume servers that use thermal/NV goggles don't want this bug back, so if someone with enough knowledge to help me/us fix this could PM me that'd be good. Please don't bother unless you have at least fairly good knowledge about scripting.

EDIT: Actually I have an idea of how I can fix this 'exploit', but I don't want to say anything in case a fix isn't possible, because then people will be running around on servers that use goggles exploiting this. Of course if I/we do manage to fix it i'll publicise it. I don't think anyone knows about this exploit.
Reply
#2

I'm not 100% sure about this, but what the hell, give it a try..
pawn Код:
public OnPlayerUpdate(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    if(i != playerid)
    {
        if(GetPlayerWeapon(i) == 45 && GetPlayerWeapon(i) == 44)
        {
            // here try to take away their weapon (goggles) in hope the effect is gone?
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)