02.07.2013, 13:26
Olб, bom dia!
Me venho a cabeзa de como fazer um sistema assim...
So pudesse dar o /guerra quando tivesse no mнnimo 2 player online de cada ORG. (Exercito, FARC e GI)
Vlw!
Me venho a cabeзa de como fazer um sistema assim...
So pudesse dar o /guerra quando tivesse no mнnimo 2 player online de cada ORG. (Exercito, FARC e GI)
pawn Code:
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;
}
if(GetPlayerInterior(playerid) != 0)
{
SendClientMessage(playerid,CINZA," Vocк nгo pode criar guerra em um interior!");
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!",playername);
SendClientMessageToAll(COLOR_EXE, string);
GetPlayerPos(playerid,x,y,z);
Territorio[MinX] = x-240;
Territorio[MinY] = y-240;
Territorio[MaxX] = x+240;
Territorio[MaxY] = y+240;
Territorio[exemortos] = 0;
Territorio[talmortos] = 0;
Territorio[almortos] = 0;
GZGuerra = GangZoneCreate(x-240,y-240,x+240,y+240);
GangZoneShowForAll(GZGuerra,COLORGZ_EXE);
VisionInfo[playerid][InicioGuerra] = 1;
TendoGuerra = 1;
//TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid);
return true;
}
if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)// Guerrilheiros Israelitas
{
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s e o Guerrilheiros Israelitas iniciaram uma Guerra!",playername);
SendClientMessageToAll(COR_GI, string);
GetPlayerPos(playerid,x,y,z);
Territorio[MinX] = x-240;
Territorio[MinY] = y-240;
Territorio[MaxX] = x+240;
Territorio[MaxY] = y+240;
Territorio[exemortos] = 0;
Territorio[talmortos] = 0;
Territorio[almortos] = 0;
GZGuerra = GangZoneCreate(x-240,y-240,x+240,y+240);
GangZoneShowForAll(GZGuerra,COLORGZ_GI);
VisionInfo[playerid][InicioGuerra] = 1;
TendoGuerra = 1;
//TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid);
return true;
}
if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)// F.A.R.C
{
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s e a F.A.R.C iniciaram uma Guerra!",playername);
SendClientMessageToAll(COR_FARC, string);
GetPlayerPos(playerid,x,y,z);
Territorio[MinX] = x-240;
Territorio[MinY] = y-240;
Territorio[MaxX] = x+240;
Territorio[MaxY] = y+240;
Territorio[exemortos] = 0;
Territorio[talmortos] = 0;
Territorio[almortos] = 0;
GZGuerra = GangZoneCreate(x-240,y-240,x+240,y+240);
GangZoneShowForAll(GZGuerra,COLORGZ_FARC);
VisionInfo[playerid][InicioGuerra] = 1;
TendoGuerra = 1;
//TempoGuerra = SetTimerEx("GuerraTerrorista", 180000, 0, "i", playerid);
return true;
}
return true;
}
