Hey,
manchmal verschwindet ein 3DTextLabel...
Code:
if(pInfo[playerid][Fraktion] == 13)
{
if(MaskUse[playerid] == 0)
{
new mask[288];
MaskUse[playerid] = 1;
SendClientMessage(playerid, COLOR_WHITE, " Du ziehst deine Maske auf.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Jemand zieht seine Maske auf.");
Speaker(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
maskiert[playerid] = Create3DTextLabel("Maskiert",COLOR_WHITE,0,0,0,30.0,1);
Attach3DTextLabelToPlayer(maskiert[playerid], playerid, 0.0, 0.0, 0.10);
ShowPlayerDialog(playerid, 2800,DIALOG_STYLE_LIST,"Welche Maske?","Helm\nKürbis\nHockey Maske\nZorro Maske","Anziehen","Schließen");
for(new i=0; i<MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
return 1;
}
else if(MaskUse[playerid] == 1)
{
MaskUse[playerid] = 0;
SendClientMessage(playerid, COLOR_WHITE, "Du ziehst deine Maske aus.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Jemand zieht seine Maske aus.");
Speaker(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Delete3DTextLabel(maskiert[playerid]);
RemovePlayerAttachedObject(playerid, 0);
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i,20,x,y,z))
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
}
return 1;
}
}