Guten Abend,
Habe da ne kleine Frage und zwar warum wird das Object nicht an den Kopf Attached ??
if(strcmp(cmdtext, "/maske", true) == 0)
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pLeader] == 21 || PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20)
{
if(Maske[playerid] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(i, playerid, 1);
SendClientMessage(playerid, COLOR_LIGHTRED, "Du hast deine Maske abgenommen.");
SetPlayerAttachedObject(playerid, 1, 19036, 2, 0.107, 0.035, 0.0, 90, 90, 0);
Maske[playerid] = 0;
}
else if(Maske[playerid] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(i, playerid, 0);
SendClientMessage(playerid, COLOR_LIGHTRED, "Du hast deine Maske aufgesetzt.");
RemovePlayerAttachedObject(playerid, 1);
Maske[playerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du kannst keine Maske aufsetzen.");
}
return 1;
}