17.07.2013, 20:07
I guess you only tested it out if the Non-Gouvernment player has an ID above yours.
Your problem is that if there is an CIA agent, cop, army or medic, you automaticly stop the timer.
This is not what it is meant to be ( what you wanted to have ). You should try this out:
You are now skipping the loop for that player id and it continues on and on for the other players. With your codes, you were stopping the loop, that's why it wasn't working.
You should have try debugging it before asking.
I hope I helped you. See you
Your problem is that if there is an CIA agent, cop, army or medic, you automaticly stop the timer.
Код:
if (gTeam[i] == TEAM_COP || gTeam[i] == TEAM_ARMY || gTeam[i] == TEAM_CIA || gTeam[i] == TEAM_MEDIC) return 1;
pawn Код:
forward PlayerZoneChecker();
public PlayerZoneChecker()
{
new Float:X,Float:Y,Float:Z;
new Float:pheal;
foreach (new i : Player){
GetPlayerPos(i,X,Y,Z);
GetPlayerHealth(i,pheal);
if ( IsSpawned[i]==1 && !IsPlayerNPC(i) ){
if (IsPlayerInArea(i,-1701.5393,647.1263,-1571.7961,718.8061)||IsPlayerInArea(i,-1336.4915,705.7386,-1182.2593,823.7599)||
IsPlayerInArea(i,-1780.9791,939.1539,-1683.4225,1063.1093)||IsPlayerInArea(i,-1546.4114,260.0058,-1222.0865,521.8784)){
if (gTeam[i] == TEAM_COP || gTeam[i] == TEAM_ARMY ||
gTeam[i] == TEAM_CIA || gTeam[i] == TEAM_MEDIC) continue;
SetPlayerHealth(i,pheal -15);
GameTextForPlayer(i, "your losing health", 2000, 3);
}
}
}
return 1;
}
You should have try debugging it before asking.
I hope I helped you. See you