18.04.2015, 20:13
PHP код:
new ProgBarTimer[MAX_PLAYERS];
ProgBarTimer[playerid] = SetTimerEx("ProgressbarTimer",15000,true,"i", playerid);
new progressTime = 0;
public ProgressbarTimer(playerid)
{
progressTime++;
if(progressTime == 1000)
{
TextDrawSetString(zProgBar, "l");
}
else if(progressTime== 2000)
{
TextDrawSetString(zProgBar, "ll");
}
else if(progressTime == 3000)
{
TextDrawSetString(zProgBar, "lll");
}
else if(progressTime == 4000)
{
TextDrawSetString(zProgBar, "llll");
}
else if(progressTime == 5000)
{
TextDrawSetString(zProgBar, "lllll");
}
else if(progressTime == 6000)
{
TextDrawSetString(zProgBar, "llllll");
}
else if(progressTime == 7000)
{
TextDrawSetString(zProgBar, "llllll");
}
else if(progressTime == 8000)
{
TextDrawSetString(zProgBar, "llllllll");
}
else if(progressTime == 9000)
{
TextDrawSetString(zProgBar, "llllllllll");
}
else if(progressTime == 10000)
{
TextDrawSetString(zProgBar, "lllllllllll");
}
else if(progressTime == 11000)
{
TextDrawSetString(zProgBar, "lllllllllll");
}
else if(progressTime == 12000)
{
TextDrawSetString(zProgBar, "llllllllllll");
}
else if(progressTime == 13000)
{
TextDrawSetString(zProgBar, "lllllllllllll");
}
else if(progressTime == 14000)
{
TextDrawSetString(zProgBar, "llllllllllllll");
}
else if(progressTime == 15000)
{
TextDrawSetString(zProgBar, "llllllllllllll");
KillTimer( ProgBarTimer[playerid] ) ;
}
return 1;
}