[HELP] What is wrong with this command?
#1

When im in car and i do "/italian hey", it doesnt show any message... But it does when im not in vehicle, whats the problem?
pawn Код:
if(strcmp(cmd, "/ita", true) == 0 || strcmp(cmd, "/italian", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
        if(gPlayerLogged[playerid] == 0)
        {
          SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
          return 1;
        }
        if(PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pMember] == 11)
        {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                new length = strlen(cmdtext);
                while ((idx < length) && (cmdtext[idx] <= ' '))
                {
                    idx++;
                }
                new offset = idx;
                new result[128];
                while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                {
                    result[idx - offset] = cmdtext[idx];
                    idx++;
                }
                result[idx - offset] = EOS;
                if(!strlen(result))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ita(lian) [chat]");
                    return 1;
                }
                new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
                new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid,x,y,z);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                      if(PlayerToPoint(20, i, x, y, z))
                      {
                            if(PlayerInfo[i][pMember] == 9 || PlayerInfo[i][pLeader] == 9 || PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pMember] == 11)
                            {
                                if(!IsPlayerInAnyVehicle(playerid))
                                {
                                    if(PlayerInfo[playerid][pMaskuse] == 1)
                                    {
                                        format(string, sizeof(string), "Masked Stranger: [Italian] %s", result);
                                        ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                                    }
                                    else
                                  {
                                    format(string, sizeof(string), "%s: [Italian] %s", sendername, result);
                                    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                                    }
                                }
                                else
                                {
                                if(pveh == 424 || pveh == 429 || pveh == 430 || pveh == 432 || pveh == 439 || pveh == 446
                                  || pveh == 448 || pveh == 449 || pveh == 452 || pveh == 453 || pveh == 454 || pveh == 457
                                  || pveh == 461 || pveh == 462 || pveh == 463 || pveh == 468 || pveh == 471 || pveh == 472
                                  || pveh == 473 || pveh == 480 || pveh == 481 || pveh == 484 || pveh == 485 || pveh == 486
                                  || pveh == 493 || pveh == 500 || pveh == 502 || pveh == 503 || pveh == 504 || pveh == 506
                                  || pveh == 509 || pveh == 510 || pveh == 521 || pveh == 522 || pveh == 523 || pveh == 530
                                  || pveh == 531 || pveh == 533 || pveh == 536 || pveh == 539 || pveh == 555 || pveh == 567
                                  || pveh == 568 || pveh == 571 || pveh == 572 || pveh == 574 || pveh == 595
                                  || pveh == 575 || pveh == 581 || pveh == 586 || pveh == 594)
                                {
                                    if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
                                    {
                                        if(PlayerInfo[playerid][pMaskuse] == 1)
                                            {
                                                format(string, sizeof(string), "Masked Stranger: [Italian][Windows Shut] %s", result);
                                                ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                                            }
                                            else
                                            {
                                              GetPlayerName(playerid, sendername, sizeof(sendername));
                                            format(string, sizeof(string), "%s: [Italian][Windows Shut] %s", sendername, result);
                                            ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                                            }
                                        }
                                        else
                                        {
                                        if(PlayerInfo[playerid][pMaskuse] == 1)
                                            {
                                                format(string, sizeof(string), "Masked Stranger: [Italian][Windows Open] %s", result);
                                                ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                                            }
                                            else
                                            {
                                              GetPlayerName(playerid, sendername, sizeof(sendername));
                                            format(string, sizeof(string), "%s: [Italian][Windows Open] %s", sendername, result);
                                            ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, " You can't talk Italian!");
            }
      }
      return 1;
    }
Reply


Messages In This Thread
[HELP] What is wrong with this command? - by KeyWay - 20.06.2009, 00:25
Re: [HELP] What is wrong with this command? - by KeyWay - 20.06.2009, 06:46
Re: [HELP] What is wrong with this command? - by The_Tough - 20.06.2009, 06:55
Re: [HELP] What is wrong with this command? - by Grim_ - 20.06.2009, 06:57
Re: [HELP] What is wrong with this command? - by KeyWay - 20.06.2009, 07:18
Re: [HELP] What is wrong with this command? - by KeyWay - 20.06.2009, 10:43
Re: [HELP] What is wrong with this command? - by Donny_k - 20.06.2009, 10:46
Re: [HELP] What is wrong with this command? - by KeyWay - 20.06.2009, 11:15
Re: [HELP] What is wrong with this command? - by Donny_k - 20.06.2009, 11:32

Forum Jump:


Users browsing this thread: 1 Guest(s)