Jump to content
  • 0

bug comanda /live


official

Question

Problema intalnita (descriere):Am comanda /live merge perfect dar cand vreau sa opresc live dau tot /live id player dar mie nu mi'l pot opri as dori si eu comanda /endlive sau tot cu /live sa imi pot opri si mie liveul
Ero(area / rile) / warning-(ul / urile): 

CMD:live(playerid, params[])
{
   new id, szPlayerName2[MAX_PLAYER_NAME];
   if(sscanf(params, "u", id)) return SCM(playerid, -1, "Syntax: /live <playerid>");
   if(playerVariables[playerid][pGroup] == 3)
   {
      if(id != INVALID_PLAYER_ID)
      {
         if(id != playerid)
         {
            if(playerVariables[id][pLive] == 0)
            {
               if(IsPlayerInRangeOfPlayer(playerid, id, 10.0))
               {
                  if(playerVariables[id][pGroup] != 3)
                  {
                     playerVariables[playerid][pLive] = 1;
                     playerVariables[id][pLive] = 1;
                     GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
                     GetPlayerName(id, szPlayerName2, MAX_PLAYER_NAME);

                     format(szMessage, sizeof(szMessage), "You have started the interview with %s.", szPlayerName2);
                     SCM(playerid, COLOR_LIGHTBLUE, szMessage);

                     format(szMessage, sizeof(szMessage), "%s has started the interview with you.", szPlayerName);
                     SCM(id, COLOR_LIGHTBLUE, szMessage);

                  }
                  else
                  {
                     SCM(playerid, -1, "This player is a reporter!");
                  }
               }
               else
               {
                  SCM(playerid, -1, "You are not below the player you wish to start the interview with!");
               }
            }
            else
            {
               playerVariables[id][pLive] = 0;
               GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
               GetPlayerName(id, szPlayerName2, MAX_PLAYER_NAME);

               format(szMessage, sizeof(szMessage), "You have finished the interview with %s.", szPlayerName2);
               SCM(playerid, COLOR_LIGHTBLUE, szMessage);

               format(szMessage, sizeof(szMessage), "%s has finished the interview with you.", szPlayerName);
               SCM(id, COLOR_LIGHTBLUE, szMessage);
            }
         }
      }
      else
      {
         SCM(playerid, -1, "The player you wish to start the interview with is not connected!");
      }
   }
   else
   {
      SCM(playerid, -1, "You are not a reporter!");
   }
   return 1;
}

Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Am incercat sa bag o comanda /endlive din alt gm dar nu functioneaza

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • 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.