//zonas de captura// stock IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax ){ new RetValue = 0; new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z ); if( X >= XMin && Y >= YMin && X < XMax && Y < YMax ) { RetValue = 1; } return RetValue; } forward checkZones(); public checkZones(){ for(new i; i != MAX_PLAYERS; ++i){ if(!IsPlayerConnected(i)) continue; dominationZone(i); GameTextForPlayer(i, "dominando a zona", 5000, 4); } return 0; } forward dominationZone(playerid); public dominationZone(playerid){ if(IsPlayerInPlace(playerid, -410.15625,1507.8125,-246.09375,1611.328125)){ // zoneSAT startDominationZone(playerid, 1); }else if(IsPlayerInPlace(playerid, 97.65625, 1339.84375,287.109375,1490.234375)) { // zoneIND startDominationZone(playerid, 2); }else if(IsPlayerInPlace(playerid, -2265.625,2279.296875,-2185.546875,2386.71875)) { // zoneBEC startDominationZone(playerid, 3); }else if(IsPlayerInPlace(playerid, 1507.8125,1390.625,1568.359375,1501.953125)) { // zoneAIR startDominationZone(playerid, 4); }else if(IsPlayerInPlace(playerid, 244.140625,1873.046875,275.390625,1916.015625)) { // zoneA51 startDominationZone(playerid, 5); }else if(IsPlayerInPlace(playerid, 349.609375,2531.25,445.3125,2562.5)){ // zoneAIB startDominationZone(playerid, 6); } return 1; } forward startDominationZone(playerid, zone); public startDominationZone(playerid, zone){ new location; switch(zone){ case 1: location = zoneSAT; case 2: location = zoneIND; case 3: location = zoneBEC; case 4: location = zoneAIR; case 5: location = zoneA51; case 6: location = zoneAIB; } if(GetPlayerTeam(playerid) == 1) { GangZoneFlashForAll(location, pgzcolor[0]); }else if(GetPlayerTeam(playerid) == 2){ GangZoneFlashForAll(location, pgzcolor[1]); }else{ GangZoneFlashForAll(location, pgzcolor[2]); } return 1; }
public startDominationZone(playerid, zone){
new location;
SendClientMessage(playerid,-1,"carregou");
switch(zone){
case 1:
location = zoneSAT;
case 2:
location = zoneIND;
case 3:
location = zoneBEC;
case 4:
location = zoneAIR;
case 5:
location = zoneA51;
case 6:
location = zoneAIB;
}
if(GetPlayerTeam(playerid) == 1) {
SendClientMessage(playerid,-1,"pisca1");
GangZoneFlashForAll(location, pgzcolor[0]);
}else if(GetPlayerTeam(playerid) == 2){
SendClientMessage(playerid,-1,"pisca2");
GangZoneFlashForAll(location, pgzcolor[1]);
}else{
SendClientMessage(playerid,-1,"pisca3");
GangZoneFlashForAll(location, pgzcolor[2]);
}
return 1;
}
sempre disse que quando for assim devem fazer um sistema de debug
tipo pawn Код:
|