10.01.2020, 16:07
Basically I want to add a sort of a "loading bar" with 3D text labels for when player gets revived, but it doesn't seem to work. It starts at two bars and just disappears, that's it.
pawn Code:
RevivingText[playerid] = Create3DTextLabel("(( |--------- ))\nHELPING UP", COLOR_DARKGREEN, pX, pY, pZ, 25.0, -1, 0);
reviveCount[playerid] = 0;
reviveTextTimer[playerid] = SetTimerEx("updateRevivingText", 500, true, "ddfff", playerid, reviveCount[playerid], pX, pY, pZ);
forward updateRevivingText(playerid, count, Float:x, Float:y, Float:z);
public updateRevivingText(playerid, count, Float:x, Float:y, Float:z)
{
switch(count)
{
case 0: Update3DTextLabelText(RevivingText[playerid], COLOR_DARKGREEN, "(( ||-------- ))\nHELPING UP");
case 1: Update3DTextLabelText(RevivingText[playerid], COLOR_DARKGREEN, "(( |||------- ))\nHELPING UP");
case 2: Update3DTextLabelText(RevivingText[playerid], COLOR_DARKGREEN, "(( ||||------ ))\nHELPING UP");
case 3: Update3DTextLabelText(RevivingText[playerid], COLOR_DARKGREEN, "(( |||||----- ))\nHELPING UP");
case 4: Update3DTextLabelText(RevivingText[playerid], COLOR_DARKGREEN, "(( ||||||---- ))\nHELPING UP");
case 5: Update3DTextLabelText(RevivingText[playerid], COLOR_DARKGREEN, "(( |||||||--- ))\nHELPING UP");
case 6: Update3DTextLabelText(RevivingText[playerid], COLOR_DARKGREEN, "(( ||||||||-- ))\nHELPING UP");
case 7: Update3DTextLabelText(RevivingText[playerid], COLOR_DARKGREEN, "(( |||||||||- ))\nHELPING UP");
case 8: Update3DTextLabelText(RevivingText[playerid], COLOR_DARKGREEN, "(( |||||||||| ))\nHELPING UP");
case 9:
{
Delete3DTextLabel(RevivingText[playerid]);
KillTimer(reviveTextTimer[playerid]);
reviveCount[playerid] = 0;
count = 0;
return 1;
}
}
count++;
reviveCount[playerid]++;
return 1;
}