23.03.2017, 10:26
(
Последний раз редактировалось Face9000; 23.03.2017 в 21:20.
)
I made a gangzone system thanks to Gammix's tutoril and i'm testing it a bit. When i enter the gangzone cp to start taking over, i get just the message "The zone is controlled by ... stay in cp for 30 seconds" and nothing happens. As you see, after this message, the gangzone should start flash and timer have to start, but nothing:
Seems the code breaks after the message..
Код:
if (GetPlayerTeam(playerid) != gCaptureZone[i][zone_Owner]) { if (IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot capture the zone in a vehicle."); } buf[0] = EOS; strcat(buf, "The zone is controlled by team "); strcat(buf, gTeamData[gCaptureZone[i][zone_Owner]][team_Name]); strcat(buf, "."); SendClientMessage(playerid, 0x00FF00FF, buf); SendClientMessage(playerid, 0x00FF00FF, "Stay in the checkpoint for "#CAPTURE_TIME" seconds to capture the zone."); GangZoneFlashForAll(gCaptureZone[i][zone_Id], SET_ALPHA(gTeamData[GetPlayerTeam(playerid)][team_Color], 100)); gCaptureZone[i][zone_Attacker] = playerid; gCaptureZone[i][zone_Players] = 1; gCaptureZone[i][zone_Tick][0] = 0; gCaptureZone[i][zone_Tick][1]= CAPTURE_TIME; KillTimer(gCaptureZone[i][zone_Timer]); gCaptureZone[i][zone_Timer] = SetTimerEx("OnZoneUpdate", 1000, true, "i", i); buf[0] = EOS; strcat(buf, "ZONE: Team "); strcat(buf, gTeamData[GetPlayerTeam(playerid)][team_Name]); strcat(buf, " is trying to capture zone "); strcat(buf, gCaptureZone[i][zone_Name]); strcat(buf, " against team "); strcat(buf, gTeamData[gCaptureZone[i][zone_Owner]][team_Name]); strcat(buf, "."); SendClientMessageToAll(0xFFFFFFFF, buf); PlayerTextDrawSetString(playerid, ptxtCapture[playerid], "Capturing in 30..."); PlayerTextDrawShow(playerid, ptxtCapture[playerid]); SetPlayerProgressBarValue(playerid, pbarCapture[playerid], gCaptureZone[i][zone_Tick][0]); ShowPlayerProgressBar(playerid, pbarCapture[playerid]); }