13.12.2012, 15:36
Quote:
Nгo tem diferenзa nгo. :S
Eu usava assim no meu GameMode e nгo causava erro algum. -- Verifique se a strtok ainda estб no seu GameMode. Pode ser conflito. |
PHP код:
public ZoneCheckpointChecker()
{
new GangString[MAX_PLAYERS];
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 fo igual da gz a gz naum sera dominada
{
if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 15)
{
cpzone[i][CPS_GetPlayerCheckpoint(i)]++;
new tmp[11];
format(tmp, sizeof tmp, "~w~%2d/15", 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, "~r~area 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
format(GangString, sizeof(GangString), "|GANGZONE| - Tem uma {00FFFF}'Gang' {FFFF00}invadindo e dominando mais um territorio!");
SendClientMessageToAll(COLOR_YELLOW, GangString);
// que dominou
}
}
}
}