Jump to content
  • 0

Problema Comanda


Sealand123

Question

Problemă întâlnită (descriere): Salut, am aceasta comanda si vreau sa o fac pentru fiecare factiune in parte in alt loc fireste dar nu merge merge doar pentru prima factioune  " pmember 16, pleader 16" cealalta nu merge
Ero(area / rile) / warning-(ul / urile): nu da eroare.
Liniile de cod / sursa / script-ul:

    if(strcmp(cmdtext, "/vestiar", true) == 0) // by LordMan
    {
        if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
        {
            if (IsPlayerInRangeOfPoint(playerid, 2, -780.3086,496.1252,1371.7490))
            {
                if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
                {
                    if (IsPlayerInRangeOfPoint(playerid, 2, 439.0473,-12.3510,1000.7344))
                       {
                        TogglePlayerControllable(playerid, 0);
                        ShowMenuForPlayer(myMenu, playerid);
                        new y, m, d;
                        new h,mi,s;
                        getdate(y,m,d);
                        gettime(h,mi,s);
                        format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /vestiar",d,m,y,h,mi,s,sendername);
                        CommandLog(string);
                        return 1;
                    }
                }
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY,"**Nu esti la vestiar.");
        }
    }

Imagini / Video (optional):
Aţi încercat să rezolvaţi singur?: Da. am  incercat sa pun si else "is pmember"  si mai multe dar nu merge

 

P.S.

De ce a fost inchis topicul acesta fara sa fie rezolvata problema si nici sa fie spus motivul? http://forum.sa-mp.ro/index.php/topic/19218-problema-carcode/

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Incearca asa:

if(strcmp(cmdtext, "/vestiar", true) == 0) // by LordMan
  {
    if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
    {
      if (IsPlayerInRangeOfPoint(playerid, 2, -780.3086,496.1252,1371.7490))
      {
            TogglePlayerControllable(playerid, 0);
            ShowMenuForPlayer(myMenu, playerid);
            new y, m, d;
            new h,mi,s;
            getdate(y,m,d);
            gettime(h,mi,s);
            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /vestiar",d,m,y,h,mi,s,sendername);
            CommandLog(string);
            return 1;
          }
        }
        else if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
        {
          if (IsPlayerInRangeOfPoint(playerid, 2, 439.0473,-12.3510,1000.7344))
           {
            TogglePlayerControllable(playerid, 0);
            ShowMenuForPlayer(myMenu, playerid);
            new y, m, d;
            new h,mi,s;
            getdate(y,m,d);
            gettime(h,mi,s);
            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /vestiar",d,m,y,h,mi,s,sendername);
            CommandLog(string);
            return 1;
          }
      }
    else
    {
      SendClientMessage(playerid, COLOR_GREY,"**Nu esti la vestiar.");
    }
  }

35012l1.png.aee1a3398b9bd9f8eec50574d2cd

Link to comment
Share on other sites

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.