02.03.2011, 22:32
Fala galйra,to com uns problemas no onplayerentercheckpoint,to fazendo o seguinte pra quando o player entrar no checkpoint ele domine a gz e a gangzona fique com a cor do player sу que quando o player entra no checkpoint tipo nгo acontece nada tinha que no caso comeзar a contar uns segundos e depois a gz ficar da cor do player nao acontece nada,isso й erro no OnPlayerEnterCheckpoint ou no ZoneCheckpointChecker??
pawn code
public ZoneCheckpointChecker()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))continue;
if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= MAX_GZS+1 &&
gzcolor[CPS_GetPlayerCheckpoint(i)-1] != GetPlayerColor(i))
// se a cor do player for igual da gz a gz nao sera dominada
{
if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 15)
{
cpzone[i][CPS_GetPlayerCheckpoint(i)]++;
new tmp[11];
format(tmp, sizeof tmp, "~b~%2d/20", cpzone[i][CPS_GetPlayerCheckpoint(i)]);
GameTextForPlayer(i, tmp, 1001, 4);
GangZoneFlashForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));
}else if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 15)
{
GivePlayerMoney(i, 200);
GameTextForPlayer(i, "~b~Gang zona dominada!", 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));//a gz fica da cor do player
// que dominou
pawn code
public ZoneCheckpointChecker()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))continue;
if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= MAX_GZS+1 &&
gzcolor[CPS_GetPlayerCheckpoint(i)-1] != GetPlayerColor(i))
// se a cor do player for igual da gz a gz nao sera dominada
{
if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 15)
{
cpzone[i][CPS_GetPlayerCheckpoint(i)]++;
new tmp[11];
format(tmp, sizeof tmp, "~b~%2d/20", cpzone[i][CPS_GetPlayerCheckpoint(i)]);
GameTextForPlayer(i, tmp, 1001, 4);
GangZoneFlashForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));
}else if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 15)
{
GivePlayerMoney(i, 200);
GameTextForPlayer(i, "~b~Gang zona dominada!", 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));//a gz fica da cor do player
// que dominou