public ZoneCheckpointChecker()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))continue;
if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= 16 &&
gzcolor[CPS_GetPlayerCheckpoint(i)-1] != gzcolorteam[gangteam[i]])
{
if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 15)
{
if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 5)
{
for(new j; j < MAX_PLAYERS; j++)
{
new str1[128], playerid; // add
new pName3[MAX_PLAYER_NAME]; // add
if(gangteam[j] == CPS_GetPlayerCheckpoint(i)-1)
GetPlayerName(playerid, pName3, MAX_PLAYER_NAME); // add
format(str1, 128, "|GANGZONE| - '%s' invadiu a base da gang '%s'", pName3, pgangnames[gangteam[i]][0]);// add
SendClientMessageToAll(0xFFFFFFFF, str1); // add
GameTextForPlayer(j, " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~y~A base do ~g~seu time ~y~esta sendo ~r~dominada~y~!", 4000, 4);
}
}
public ZoneCheckpointChecker()
{
new gid = 0;
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))continue;
if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= 16 && gzcolor[CPS_GetPlayerCheckpoint(i)-1] != gzcolorteam[gangteam[i]])
{
if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 15)
{
if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 5)
{
for(new j; j < MAX_PLAYERS; j++)
{
if(gangteam[j] == CPS_GetPlayerCheckpoint(i)-1) GameTextForPlayer(j, " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~y~A base do ~g~seu time ~y~esta sendo ~r~dominada~y~!", 4000, 4);
gid = i;
break;
}
}
}
}
}
new str1[128], playerid; // add
new pName3[MAX_PLAYER_NAME]; // add
GetPlayerName(playerid, pName3, MAX_PLAYER_NAME); // add
format(str1, 128, "|GANGZONE| - '%s' invadiu a base da gang '%s'", pName3, pgangnames[gangteam[gid]][0]);// add
SendClientMessageToAll(0xFFFFFFFF, str1); // add
|
pawn Код:
|
public ZoneCheckpointChecker()
{
new gid = 0;
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))continue;
if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= 16 && //Valor total de gangs
//sгo 11 checkpoints, entгo mude se for colocar mais...
gzcolor[CPS_GetPlayerCheckpoint(i)-1] != gzcolorteam[gangteam[i]])
{
if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 15)
{
if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 5)
{
for(new j; j < MAX_PLAYERS; j++)
{
if(gangteam[j] == CPS_GetPlayerCheckpoint(i)-1)
GameTextForPlayer(j, " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~y~A base do ~g~seu time ~y~esta sendo ~r~dominada~y~!", 4000, 4);
gid = i;
break;
}
new str1[128], playerid; // add
new pName3[MAX_PLAYER_NAME]; // add
GetPlayerName(playerid, pName3, MAX_PLAYER_NAME); // add
format(str1, 128, "|GANGZONE| - '%s' invadiu a base da gang '%s'", pName3, pgangnames[gangteam[gid]][0]);// add
SendClientMessageToAll(0xFFFFFFFF, str1); // add
}
}
cpzone[i][CPS_GetPlayerCheckpoint(i)]++;
new tmp[10];
format(tmp, sizeof tmp, "~r~%2d/15", cpzone[i][CPS_GetPlayerCheckpoint(i)]);
GameTextForPlayer(i, tmp, 1001, 4);
GangZoneFlashForAll(CPS_GetPlayerCheckpoint(i)-1, gzcolorteam[gangteam[i]]);
} else if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 15) //passou 30 segundos dentro do checkpoint
{
GameTextForPlayer(i, "~w~Area Dominada", 4000, 1);
gzcolor[CPS_GetPlayerCheckpoint(i)-1] = gzcolorteam[gangteam[i]];
GangZoneStopFlashForAll(CPS_GetPlayerCheckpoint(i)-1);
GangZoneHideForAll(CPS_GetPlayerCheckpoint(i)-1);
GangZoneShowForAll(CPS_GetPlayerCheckpoint(i)-1, gzcolor[gangteam[i]]);
new str[128], playerid;
new pName2[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName2, MAX_PLAYER_NAME);
format(str, 128, "|GANGZONE| - '%s' invadiu e dominou mais um territуrio para a gang '%s'", pName2, pgangnames[gangteam[i]][0]);
SendClientMessageToAll(0xFFFFFFFF, str);
PlayerInfo[i][pDominou]++;
}
}
}
}