Jump to content
  • 0

war infinit


smokeyutzu

Question

Salut am o problema waru nu se termina niciodatauite aici comenzile si wartimer

[pawn]if(strcmp(cmd, "/startwar", true) == 0)

{

if(IsPlayerConnected(playerid))

  {

    if(wtimer[playerid] < 1)

{ }

else

        {

            SendClientMessage(playerid, COLOR_GREY, "Trebuie sa astepti 12 ore la fiecare war!");

            return 1;

        }

if(PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 12)

  {

      provoked = 1;

new x_nr[256];

x_nr = strtok(cmdtext, idx);

if(!strlen(x_nr))

{

SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: /startwar list , /startwar [locul]");

return 1;

  }

  if(strcmp(x_nr,"list",true) == 0)

  {

SendClientMessage(playerid, COLOR_YELLOW, "_________Lista Locuri_________");

SendClientMessage(playerid, COLOR_GRAD1, "1:GS/LS 2: BS/LS  3: Madd Dog House 4: Banca");

return 1;

  }

  else if(strcmp(x_nr,"1",true) == 0)

  {

    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Triads-{DBDB70}LSV{D3D3D3}-{66CD00}Grove {00FA9A}au declarat WAR , zona: {FFFFFF}GS/LS");

    return 1;

}

    else if(strcmp(x_nr,"2",true) == 0)

    {

    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Triads-{DBDB70}LSV{D3D3D3}-{66CD00}Grove {00FA9A}au declarat WAR , zona: {FFFFFF}BS/LS");

    return 1;

}

else if(strcmp(x_nr,"3",true) == 0)

    {

      SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Triads-{DBDB70}LSV{D3D3D3}-{66CD00}Grove {00FA9A}au declarat WAR , zona: {FFFFFF}Madd Dog House");

          return 1;

}

else if(strcmp(x_nr,"4",true) == 0)

    {

      SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Triads-{DBDB70}LSV{D3D3D3}-{66CD00}Grove {00FA9A}au declarat WAR , zona: {FFFFFF}Banca");

          return 1;

}

}

else if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pLeader] == 16)

{

    provoked = 1;

  new x_nr[256];

x_nr = strtok(cmdtext, idx);

if(!strlen(x_nr))

{

SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: /startwar list , /startwar [locul]");

return 1;

}

if(strcmp(x_nr,"list",true) == 0)

  {

SendClientMessage(playerid, COLOR_YELLOW, "_________Lista Locuri_________");

SendClientMessage(playerid, COLOR_GRAD1, "1: GS/LS 2: BS/LS 3: Madd Dog House 4: Banca");

  return 1;

    }

      else if(strcmp(x_nr,"1",true) == 0)

        {

          SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Mafia{D3D3D3}-{97FFFF}VLA{D3D3D3}-{CD3278}Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}GS/LS");

              return 1;

}

    else if(strcmp(x_nr,"2",true) == 0)

      {

          SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Mafia{D3D3D3}-{97FFFF}VLA{D3D3D3}-{CD3278}Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}BS/LS");

            return 1;

}

else if(strcmp(x_nr,"3",true) == 0)

    {

      SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Mafia{D3D3D3}-{97FFFF}VLA{D3D3D3}-{CD3278}Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}Madd Dog House");

          return 1;

}

else if(strcmp(x_nr,"4",true) == 0)

    {

      SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Mafia{D3D3D3}-{97FFFF}VLA{D3D3D3}-{CD3278}Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}Banca");

          return 1;

}

}

else

{

  SendClientMessage(playerid, COLOR_GRAD2, "You are not a gang / mafia leader!");

  return 1;

      }

        wtimer[playerid] = 3000000;

}

return 1;

}

if(strcmp(cmd, "/acceptwar", true) == 0)

{

        if(IsPlayerConnected(playerid))

        {

        if (provoked == 1)

    {

            if (PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pLeader] == 5)

        {

          new hour,minuite;

          gettime(hour,minuite);

          FixHour(hour);

          scoreteam1 = 0;

  scoreteam2 = 0;

        SetTimer("wartime", 1800000, false);

          SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");

          format(string, sizeof(string), "{006633}Grove Street - {CC9933}Los Santos Vagos - {663300}The Triads vS {660099}Ballas - {99FFFF}Varrios Los Aztecas - {990033}The Mafia");

          SendClientMessageToAll(COLOR_WHITE,string);

          SendClientMessageToAll(COLOR_WHITE, "Premiul: {F81414}50.000 {33AA33}$ {F81414}5000 {33AA33}Mats {F81414}200 {33AA33}Drugs");

          format(string, sizeof(string), "War inceput la ora: {F81414}%d: %d", hour, minuite);

          SendClientMessageToAll(COLOR_WHITE,string);

          SendClientMessageToAll(COLOR_WHITE, "Va rugam evitati acea zona!");

          SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");

          provoked = 0;

            }

            }

            else

            {

              SendClientMessage(playerid, COLOR_GREY, "You are not a Leader or a gang/mafia Leader.");

            }

            }

      return 1;

}[/pawn]

[pawn]forward wartime();

public wartime()

{

if(scoreteam1 > scoreteam2)

{

SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");

SendClientMessageToAll(COLOR_WHITE, "{F81414}Alianta {660099}Ballas - {99FFFF}Varrios Los Aztecas - {990033}The Mafia{F81414} a castigat warul");

//SendClientMessageToAll(COLOR_WHITE, "{6EF83C}Scor war: Ballas - VLA - TM vs Grove - LSV - TT : %d - %d  ", scoreteam1 , scoreteam2);

SendClientMessageToAll(COLOR_WHITE, "{F81414}All player on this aliances won 50.000 $, 5000 Mats, 100 Drugs.");

SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");

scoreteam1 = 0;

scoreteam2 = 0;

for(new i = 0; i < MAX_PLAYERS; i++)

{

if(IsPlayerConnected(i))

{

new leader = PlayerInfo[pLeader], member = PlayerInfo[pMember];

if(leader == ID || leader == ID || leader == ID || member == ID || member == ID || member == ID)

{

PlayerInfo[pMats] += 5000;

PlayerInfo[pDrugs] += 100;

GivePlayerMoney(i, 50000);

}

}

}

}

else if(scoreteam1 < scoreteam2)

{

SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");

SendClientMessageToAll(COLOR_WHITE, "{F81414}Alianta {006633}Grove Street - {CC9933}Los Santos Vagos - {663300}The Triads{F81414} a castigat warul");

//SendClientMessageToAll(COLOR_WHITE, "{6EF83C}Scor war: Grove - LSV - TT vs Ballas - VLA - TM : %d - %d  ", scoreteam2 , scoreteam1);

SendClientMessageToAll(COLOR_WHITE, "{F81414}All player on this aliances won 50.000 $, 5000 Mats, 100 Drugs.");

SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");

scoreteam1 = 0;

scoreteam2 = 0;

for(new i = 0; i < MAX_PLAYERS; i++)

{

if(IsPlayerConnected(i))

{

new leader = PlayerInfo[pLeader], member = PlayerInfo[pMember];

if(leader == ID || leader == ID || leader == ID || member == ID || member == ID || member == ID)

{

PlayerInfo[pMats] += 5000;

PlayerInfo[pDrugs] += 100;

GivePlayerMoney(i, 50000);

}

}

}

}

return 1;

}[/pawn]

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.