Annoying /mask problem :/
#4

What's up buddy? I'll write a fix for this tomorrow if you can't get it working properly.

For now, try this(untested);

Код:
//add this stock anywhere in your script, I would do it where the other stocks are.
//If you don't have any stocks yet, just put this at the very bottom so you can find it easily.
stock MaskFix(playerid)
{
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    ShowPlayerNameTagForPlayer(i, playerid, 0);
                }
            }
}

// then look for OnPlayerInteriorChange
//Make it look like this.

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    MaskFix(playerid);
    return 1;
}
This should fix it, however I've never used this callback, therefore it might only work when entering or when exiting an interior, however it should work perfectly as I don't see why it wouldn't...

Also, this will only fix the interior bug, obviously it's not gonna do anything if for example when a player gets in a vehicle.

Anytime the mask disappears, you can use MaskFix(playerid); inside it's callback.

So, if it disappeared when a player entered a vehicle, just put MaskFix(playerid) inside OnPlayerEnterVehicle
and OnPlayerExitVehicle, etc.

If you do it under onplayerupdate as mentioned before, it will work, but it will CONSTANTLY run that function like once every 2 seconds or something. This could cause your server to lag out, basically like DOSing yourself.
Reply


Messages In This Thread
Annoying /mask problem :/ - by Lajko1 - 29.01.2014, 22:24
Re: Annoying /mask problem :/ - by jakejohnsonusa - 29.01.2014, 22:29
Re: Annoying /mask problem :/ - by Abagail - 29.01.2014, 22:31
Re: Annoying /mask problem :/ - by Unfriendly - 30.01.2014, 14:40
Re: Annoying /mask problem :/ - by Don_Cage - 30.01.2014, 15:13
Re: Annoying /mask problem :/ - by Lajko1 - 30.01.2014, 16:29

Forum Jump:


Users browsing this thread: 1 Guest(s)