18.04.2015, 19:29
Hello i am trying to make a progressbar for my zone capture this what i did so far but its not working :
Please help me
PHP код:
forward ProgressbarTimer(playerid);
new ProgBarTimer;
//Textdraws
zProgBackGround[playerid] = CreatePlayerTextDraw(playerid, 373.974548, 274.499786, "usebox");
PlayerTextDrawLetterSize(playerid, zProgBackGround[playerid], 0.000000, 1.637776);
PlayerTextDrawTextSize(playerid, zProgBackGround[playerid], 256.900024, 0.000000);
PlayerTextDrawAlignment(playerid, zProgBackGround[playerid], 1);
PlayerTextDrawColor(playerid, zProgBackGround[playerid], 0);
PlayerTextDrawUseBox(playerid, zProgBackGround[playerid], true);
PlayerTextDrawBoxColor(playerid, zProgBackGround[playerid], 102);
PlayerTextDrawSetShadow(playerid, zProgBackGround[playerid], 0);
PlayerTextDrawSetOutline(playerid, zProgBackGround[playerid], 0);
PlayerTextDrawFont(playerid, zProgBackGround[playerid], 0);
zProgBar[playerid] = CreatePlayerTextDraw(playerid, 267.099945, 272.089782, " ");
PlayerTextDrawLetterSize(playerid, zProgBar[playerid], 0.657849, 1.917566);
PlayerTextDrawAlignment(playerid, zProgBar[playerid], 1);
PlayerTextDrawColor(playerid, zProgBar[playerid], -5963521);
PlayerTextDrawSetShadow(playerid, zProgBar[playerid], 0);
PlayerTextDrawSetOutline(playerid, zProgBar[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, zProgBar[playerid], 51);
PlayerTextDrawFont(playerid, zProgBar[playerid], 1);
PlayerTextDrawSetProportional(playerid, zProgBar[playerid], 1);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == ZoneCP[TownHall])
{
if(aDuty[playerid] == 1) return SendClientMessage(playerid, -1,"{0080FF}[ Zone ]: {FFFFFF}You cant capture a zone while onduty");
if(TeamCheck[TownHall] == gTeam[playerid]) return SendClientMessage(playerid, -1,"{0080FF}[ Zone ]: {FFFFFF}This zone is already captured by your team");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1,"ERROR: You cannot capture while in vehicle!");
if(zUnderAttack[TownHall] == 0)
{
zUnderAttack[TownHall] = 1;
IsPlayerCapturing[playerid] = 1;
ZoneTimer[playerid][TownHall] = SetTimerEx("SetZone",25000,false,"i", playerid);
ProgBarTimer = SetTimerEx("ProgressbarTimer",15000,false,"i", playerid);
GangZoneFlashForAll(GangZone[TownHall],GetPlayerColor(playerid));
SendClientMessageToAll(-1, "{0080FF}[ Zone ]: {FFFFFF}Zone TownHall is being taken over");
ZoneDefine[playerid] = TownHall;
}
else return SendClientMessage(playerid, -1,"{0080FF}[ Zone ]: {FFFFFF}This zone is already being taken over!");
}
return 1;
}
public ProgressbarTimer(playerid)
{
if ProgBarTimer == 1000)
(
TextDrawSetString(zProgBar, l);
}
else if ProgBarTimer == 2000)
(
TextDrawSetString(zProgBar, ll);
)
else if ProgBarTimer == 3000)
(
TextDrawSetString(zProgBar, lll);
)
else if ProgBarTimer == 4000)
(
TextDrawSetString(zProgBar, llll);
)
else if ProgBarTimer == 5000)
(
TextDrawSetString(zProgBar, lllll);
)
else if ProgBarTimer == 6000)
(
TextDrawSetString(zProgBar, llllll);
)
else if ProgBarTimer == 7000)
(
TextDrawSetString(zProgBar, lllllll);
)
else if ProgBarTimer == 8000)
(
TextDrawSetString(zProgBar, llllllll);
)
else if ProgBarTimer == 9000)
(
TextDrawSetString(zProgBar, llllllllll);
)
else if ProgBarTimer == 10000)
(
TextDrawSetString(zProgBar, lllllllllll);
)
else if ProgBarTimer == 11000)
(
TextDrawSetString(zProgBar, lllllllllll);
)
else if ProgBarTimer == 12000)
(
TextDrawSetString(zProgBar, llllllllllll);
)
else if ProgBarTimer == 13000)
(
TextDrawSetString(zProgBar, lllllllllllll);
)
else if ProgBarTimer == 14000)
(
TextDrawSetString(zProgBar, llllllllllllll);
)
else if ProgBarTimer == 15000)
(
TextDrawSetString(zProgBar, llllllllllllll);
)
return 1;
}
Please help me