Fehler behoben .
public OnPlayerUpdate(playerid)
{
new string[32];
if(IsPlayerOnDesktop(playerid))
{
format(string, 32, "%s Sekunden AFK", GetPlayerDesktopTime(playerid));
if(GetPVarInt(playerid, "TextSend") == 0)
{
SetPVarInt(playerid, "TextSend", 1);
PlayerText[playerid] = Create3DTextLabel(string, COLOR_LIGHTRED, 0.0, 0.0, 0.0, 20.0, -1, -1);
Attach3DTextLabelToPlayer(PlayerText[playerid], playerid, 0.0, 0.0, 0.0);
return true;
}
Update3DTextLabelText(PlayerText[playerid], COLOR_LIGHTRED, string);
}
else
{
if(GetPVarInt(playerid, "TextSend") == 1)
{
Delete3DTextLabel(PlayerText[playerid]);
SetPVarInt(playerid, "TextSend", 0);
return true;
}
}
return true;
}
Hier der Fehler:
public OnPlayerUpdate(playerid)
{
new string[32];
if(IsPlayerOnDesktop(playerid))
{
format(string, 32, "%s Sekunden AFK", GetPlayerDesktopTime(playerid));
if(GetPVarInt(playerid, "TextSend") == 0)
{
SetPVarInt(playerid, "TextSend", 1);
PlayerText[playerid] = Create3DTextLabel(string, COLOR_LIGHTRED, 0.0, 0.0, 0.0, 20.0, -1, -1); // die Klammer}
Attach3DTextLabelToPlayer(PlayerText[playerid], playerid, 0.0, 0.0, 0.0);
return true;
}
Update3DTextLabelText(PlayerText[playerid], COLOR_LIGHTRED, string);
}//13628
else//13629
{
if(GetPVarInt(playerid, "TextSend") == 1)//13631
{
Delete3DTextLabel(PlayerText[playerid]);
SetPVarInt(playerid, "TextSend", 0);
return true;//13635
}
}
return true;//13638
}
MFG RFT