07.01.2011, 12:17
Just one of them shows up. They should show up both.
pawn Код:
forward energytimer();
new Text:noenergy[2];
pawn Код:
public energytimer()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(energy[i]>=5)
{
energy[i] -=5;
TextDrawShowForPlayer(i,noenergy[0]);
TextDrawShowForPlayer(i,noenergy[1]);
return 1;
}
else
{
TogglePlayerControllable(i,0);
TextDrawShowForPlayer(i,noenergy[1]);
}
}
return 1;
}
pawn Код:
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
noenergy[0] = TextDrawCreate(79.000000, 146.000000, "Out of energy, you're unconscious\nUse /kill or wait for a medic");
TextDrawBackgroundColor(noenergy[0], 255);
TextDrawFont(noenergy[0], 2);
TextDrawLetterSize(noenergy[0], 0.400000, 1.300000);
TextDrawColor(noenergy[0], 0xFF4F05ff);
TextDrawSetOutline(noenergy[0], 1);
TextDrawSetProportional(noenergy[0], 1);
noenergy[1] = TextDrawCreate(84.000000, 325.000000, "Use /kill or wait for a medic");
TextDrawBackgroundColor(noenergy[1], 255);
TextDrawFont(noenergy[1], 2);
TextDrawLetterSize(noenergy[1], 0.599999, 2.499999);
TextDrawColor(noenergy[1], -1);
TextDrawSetOutline(noenergy[1], 1);
TextDrawSetProportional(noenergy[1], 1);
return 1;
}