if(strcmp(cmd, "/dominar", true) == 0 || strcmp(cmd, "/do", true) == 0) { new carid = GetPlayerVehicleID(playerid); if(IsAPlane(carid)) { SendClientMessage(playerid, COLOR_GRAD5, "Vocк nгo pode usar esse comando dentro de um heli ou aviгo."); return 1; }
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1)// PM { if(IsPlayerInSkate(playerid)) { if(Dominando[playerid] == 1) { SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio."); return 1; } if(GuerranoSkate == 1) { SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio."); return 1; } GetPlayerName(playerid, playername, MAX_PLAYER_NAME); format(string, sizeof(string), "%s e a Policia Militar estгo dominando a Pista de Skate!",playername); SendClientMessageToAll(COR_PM, string); SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todas as gangues foram avisadas!"); SendClientMessage(playerid, COLOR_GRAD5, "Espere 30 segundos para dominar estб area ."); GangZoneFlashForAll(GZSkate,GCOP_COLOR); Dominando[playerid] = 1; ProvocoSkate[playerid] = 1; GuerranoSkate = 1; TempoGuerraSkate = SetTimerEx("GuerraSkate", 30000, 0, "i", playerid); return 1; } else { SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!"); } return 1; }
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1)// PM { if(IsPlayerInPark(playerid)) { if(Dominando[playerid] == 1) { SendClientMessage(playerid, GCOP_COLOR, "Vocк ja estб dominando um territorio."); return 1; } if(GuerranoPark == 1) { SendClientMessage(playerid, GCOP_COLOR, "Jб estб tendo uma guerra nesse territorio."); return 1; } GetPlayerName(playerid, playername, MAX_PLAYER_NAME); format(string, sizeof(string), "%s e a Policia Militar estгo dominando o Park Gleen!",playername); SendClientMessageToAll(COR_PM, string); SendClientMessage(playerid, GCOP_COLOR, "Fique esperto, todas as gangues foram avisadas!"); SendClientMessage(playerid, GCOP_COLOR, "Espere 30 segundos para dominar estб area ."); GangZoneFlashForAll(GZPark,GCOP_COLOR); Dominando[playerid] = 1; ProvocoPark[playerid] = 1; GuerranoPark = 1; TempoGuerraPark = SetTimerEx("GuerraPark", 30000, 0, "i", playerid); return 1; } else { SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!!!!!"); } return 1; }
Vocк nгo estб em nehum territуrio!
IsPlayerInPark(playerid)
stock IsPlayerInPark(playerid) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid, x, y, z); if(x >= 1866.346 && y >= -1259.454 && x <= 2052.685 && y <= -1137.074) return 1; else return 0; }
Код:
stock IsPlayerInPark(playerid) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid, x, y, z); if(x >= 1866.346 && y >= -1259.454 && x <= 2052.685 && y <= -1137.074) return 1; else return 0; } |
Bom acho que nao isso pq as outras orgs consegue dominar o Park,isso sу nгo da com as orgs que add nas Gangzone |