01.03.2013, 00:34
como eu fasso para nao dominar a minha propria Checkpoint
pawn Код:
public ZoneCheckpointCheckerbyRangel()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))continue;
if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= 5 &&
//sгo 2 checkpoints, entгo mude se for colocar mais...
gzcolor[CPS_GetPlayerCheckpoint(i)-1] != GetPlayerColor(i))
{
if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 30)
{
cpzone[i][CPS_GetPlayerCheckpoint(i)]++;
new tmp[10];
format(tmp, sizeof tmp, "~w~%2d/30", cpzone[i][CPS_GetPlayerCheckpoint(i)]);
GameTextForPlayer(i, tmp, 1001, 4);
GangZoneFlashForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));
} else if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 30) //passou 30 segundos dentro do checkpoint
{
GameTextForPlayer(i, "~w~Conquistado", 4000, 1);
gzcolor[CPS_GetPlayerCheckpoint(i)-1] = GetPlayerColor(i);
GangZoneStopFlashForAll(CPS_GetPlayerCheckpoint(i)-1);
GangZoneHideForAll(CPS_GetPlayerCheckpoint(i)-1);
GangZoneShowForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));//Ficar piscando a cor do player na GZ
}
}
}
}