22.02.2014, 11:44
eu queria colocar esse /guerra para /guerra [horas] com 2 horas minimas de guerra e 10 horas maxima de guerra. e fazer um placar com os pontos da guerra e o tempo que resta.
Код HTML:
if(strcmp(cmd, "/guerra", true) == 0) { if(PlayerInfo[playerid][pJailed] != 0) { SendClientMessage(playerid,CINZA," Vocк nгo pode criar guerra na cadeia!"); return true; } if(TendoGuerra >= 1) { SendClientMessage(playerid, CINZA, " Jб estб tendo uma guerra!"); return true; } new Float:x,Float:y,Float:z; if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)// EXE { GetPlayerName(playerid, playername, MAX_PLAYER_NAME); format(string, sizeof(string), "%s e o Exйrcito iniciaram uma Guerra.Evitem a бrea!",playername); SendClientMessageToAll(COLOR_EXE, string); GetPlayerPos(playerid,x,y,z); Territorio[MinX] = x-150; Territorio[MinY] = y-150; Territorio[MaxX] = x+150; Territorio[MaxY] = y+150; Territorio[exemortos] = 0; Territorio[talmortos] = 0; Territorio[almortos] = 0; Territorio[GImortos] = 0; GuerraMinX = x-150; GuerraMinY = y-150; GuerraMaxX = x+150; GuerraMaxY = y+150; GZGuerra = GangZoneCreate(x-150,y-150,x+150,y+150); GangZoneShowForAll(GZGuerra,COLORGZ_EXE); BGRInfo[playerid][InicioGuerra] = 1; TendoGuerra = 1; TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid); return true; } if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)// GI { GetPlayerName(playerid, playername, MAX_PLAYER_NAME); format(string, sizeof(string), "%s e a FARC iniciaram uma Guerra.Evitem a бrea!",playername); SendClientMessageToAll(COR_FARC, string); GetPlayerPos(playerid,x,y,z); Territorio[MinX] = x-150; Territorio[MinY] = y-150; Territorio[MaxX] = x+150; Territorio[MaxY] = y+150; Territorio[exemortos] = 0; Territorio[talmortos] = 0; Territorio[almortos] = 0; Territorio[GImortos] = 0; GuerraMinX = x-150; GuerraMinY = y-150; GuerraMaxX = x+150; GuerraMaxY = y+150; GZGuerra = GangZoneCreate(x-150,y-150,x+150,y+150); GangZoneShowForAll(GZGuerra,COLORGZ_ALCAIDA); BGRInfo[playerid][InicioGuerra] = 1; TendoGuerra = 1; TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid); return true; } if(PlayerInfo[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23)// F ARC { GetPlayerName(playerid, playername, MAX_PLAYER_NAME); format(string, sizeof(string), "%s e a Guerrilheiros Israelitas iniciaram uma Guerra.Evitem a бrea!",playername); SendClientMessageToAll(COR_GI, string); GetPlayerPos(playerid,x,y,z); Territorio[MinX] = x-150; Territorio[MinY] = y-150; Territorio[MaxX] = x+150; Territorio[MaxY] = y+150; Territorio[exemortos] = 0; Territorio[talmortos] = 0; Territorio[almortos] = 0; Territorio[GImortos] = 0; GuerraMinX = x-150; GuerraMinY = y-150; GuerraMaxX = x+150; GuerraMaxY = y+150; GZGuerra = GangZoneCreate(x-150,y-150,x+150,y+150); GangZoneShowForAll(GZGuerra,COLORGZ_GI); BGRInfo[playerid][InicioGuerra] = 1; TendoGuerra = 1; TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid); return true; } return true; }