30.01.2014, 14:40
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);
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.
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; }
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.