[Pomoc] oko komande otvaranja kapije sa H

Započeo Lexa, Novembar 24, 2012, 14:07:00 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Mod-tx
Opis problema -Kako da prebacim ovu komandu/otvorikapiju na komandu da se otvara sa H kad si u autu a sa C kad si van auta za PD.
Dio skripte-

if(!strcmp(cmdtext, "/gateopen", true) || !strcmp(cmdtext, "/otvorikapiju", true)) // By Ellis
   {
       if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
       {
            if (PlayerToPoint(15, playerid,1547.09997559,-1627.90002441,14.50000000))
         {
               MoveDynamicObject(pdkapijaa,1547.40002441,-1627.59997559,6.09999990, 2.4);
               SetTimer("GateClose23", 12000, 0);
               SendClientMessage(playerid, COLOR_BLUE,"Kapija je otvorena zatvorice se za 7 sekundi.");
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "* %s vadi svoj daljinski i otvara kapiju.", sendername);
               ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
               PlayerPlaySound(playerid, 1153, 1547.09997559,-1627.90002441,3.20000005);
         }
           if (PlayerToPoint(15, playerid,1589.053344,-1638.123168,14.122960))
         {
               MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8,-1000.0,-1000.0,-1000.0);
               SetTimer("GateClose", 12000, 0);
               SendClientMessage(playerid, COLOR_BLUE,"Garaza je otvorena i zatvorice se za 7 sekundi.");
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "* %s uzima daljinski i otvara garazu (/gateopen) .", sendername);
               ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
               PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
         }
      else if (PlayerToPoint(15, playerid,2720.3772,-2409.7523,12.6))
      {
            MoveDynamicObject(armygate1,2720.3772, -2401.2523, 12.6, 3.5,-1000.0,-1000.0,-1000.0);
            SetTimer("GateClose2", 7000, 0);
            SendClientMessage(playerid, COLOR_BLUE,"Vojna kapija broj 1 je otvorena i zatvorice se za 7 sekundi.");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "* %s vadi svoj/njen daljinski i otvara kapiju broj 1 (/gateopen) .", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
      }
      else if (PlayerToPoint(15, playerid,2720.3772,-2508.3069,12.6))
      {
            MoveDynamicObject(armygate2,2720.3772, -2499.8069, 12.6, 3.5,-1000.0,-1000.0,-1000.0);
            SetTimer("GateClose2", 7000, 0);
            SendClientMessage(playerid, COLOR_BLUE,"Vojna kapija broj 2 je otvorena i zatvorice se za 7 sekundi.");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "* %s vadi svoj/njen daljinski i otvara kapiju broj 2 (/gateopen) .", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
      }
      else if (PlayerToPoint(15, playerid,1534.9020,-1451.5979,14.4882))
         {
               MoveDynamicObject(fbigate,1534.9020,-1451.5979,20.4882, 1.5,-1000.0,-1000.0,-1000.0);
               SetTimer("GateClose3", 7000, 0);
               SendClientMessage(playerid, COLOR_BLUE,"Interventna kapija je otvorena i zatvorice se za 7 sekundi.");
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "* %s uzima daljinski i otvara Interventna kapiju (/gateopen) .", sendername);
               ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
      }
      else if (PlayerToPoint(15, playerid,1643.3379,-1714.9338,15.3067))
      {
            MoveDynamicObject(hspdgate,1643.3379,-1705.9338,15.3067, 1.5,-1000.0,-1000.0,-1000.0);
            SetTimer("GateClose4", 7000, 0);
            SendClientMessage(playerid, COLOR_BLUE,"Policijska kapija je otvorena i zatvorice se za 7 sekundi.");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "* %s vadi svoj/njen daljinski i otvara policijsku kapiju (/gateopen) .", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
      }
      else { SendClientMessage(playerid, COLOR_GREY,"Kapija je suvise daleko"); }
    }
   else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
   {
       if (PlayerToPoint(15, playerid,1246.0033,-767.3727,91.1473))
       {
           MoveDynamicObject(lucianogate,1256.2033,-767.3727,91.1473, 2.2,-1000.0,-1000.0,-1000.0);
           SetTimer("GateClose6", 7000, 0);
           GetPlayerName(playerid, sendername, sizeof(sendername));
           format(string, sizeof(string), "* %s vadi svoj/njen daljinski i otvara LFS kapiju (/gateopen) .", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
       }
       else { SendClientMessage(playerid, COLOR_GREY,"Kapija je suvise daleko"); }
   }
    else if(PlayerInfo[playerid][pLeader] == 18 || PlayerInfo[playerid][pMember] == 18)
       {
           if (PlayerToPoint(15, playerid,1284.5, -2056.5, 60.5))
         {
               MoveDynamicObject(lcngate,1284.5, -2056.5, 55, 3.0,-1000.0,-1000.0,-1000.0);
               SetTimer("GateClose9", 7000, 0);
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "* %s vadi svoj/njen daljinski i otvara LCN kapiju.", sendername);
               ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
               //PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
         }
      }
            else if(PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 14)
       {
           if (PlayerToPoint(15, playerid,1284.5, -2056.5, 60.5))
         {
               MoveDynamicObject(yamkapija,1284.5, -2056.5, 55, 3.0,-1000.0,-1000.0,-1000.0);
               SetTimer("GateClose25", 7000, 0);
               GetPlayerName(playerid, sendername, sizeof(sendername));
               format(string, sizeof(string), "* %s vadi svoj/njen daljinski i otvara YAMAGUCHI kapiju.", sendername);
               ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
               //PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
         }
      }