23.11.2011, 17:06
Код:
if(strcmp(cmd, "/dominar", true) == 0 || strcmp(cmd, "/do", true) == 0) { new carid = GetPlayerVehicleID(playerid); if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)// Taliban { if(IsPlayerInRepresa(playerid)) { if(Dominando[playerid] == 1) { SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio."); return 1; } if(GuerranaRepresa == 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 o Taliban estгo dominando a Represa!",playername); SendClientMessageToAll(COR_TAL, string); SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todos os Terroristas e o Exercito foram avisados!"); SendClientMessage(playerid, COLOR_GRAD5, "Espere 1 minuto para dominar estб area ."); GangZoneFlashForAll(GZRepresa,COR_TAL); Dominando[playerid] = 1; ProvocoRepresa[playerid] = 1; GuerranaRepresa = 1; TempoGuerraRepresa = SetTimerEx("GuerraRepresa", 60000, 0, "i", playerid); return 1; } else { SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!"); } return 1; } return 1; }
Код:
public GuerraRepresa(playerid) { new string[128]; new playername[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6) { if(ProvocoRepresa[playerid] == 1) { if(IsPlayerInRepresa(playerid)) { GetPlayerName(playerid, playername, MAX_PLAYER_NAME); ormat(string, sizeof(string), "%s e o Taliban Dominaram a Represa!",playername); SendClientMessageToAll(COR_TAL, string); SendClientMessage(playerid, COLOR_GRAD5, "Vocк dominou a Represa, a cada 5 minutos nela ganharб grana."); GangZoneStopFlashForAll(GZRepresa); GangZoneShowForAll(GZRepresa,COR_TAL); Dominando[playerid] = 0; ProvocoRepresa[playerid] = 0; GuerranaRepresa = 0; donoRepresa = 1; KillTimer(TempoGuerraRepresa); return 1; } else { SendClientMessage(playerid, COR_GRO, "Vocк nгo estб na Represa!"); Dominando[playerid] = 0; GangZoneStopFlashForAll(GZRepresa); GangZoneShowForAll(GZRepresa, 0xFFFFFF96); ProvocoRepresa[playerid] = 0; GuerranaRepresa = 0; donoRepresa = 0; KillTimer(TempoGuerraRepresa); return 1; } } return 1; } return 1; }