(POMOC) Oko otvaranja kapije na h

Započeo Shadow_BS, Februar 06, 2016, 14:17:57 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: UP samo sto su mape i td-ovi edit
Detaljan opis problema: kapije se otvaraju na /otvori kako da namjestim da se otvaraju ono na h
Dio skripte: http://pastebin.com/xNmVQzXh
Neke slike/video za lakse dobivanje pomoci(neobavezno): //

postavi u onplayerkeystatechange
[pawn]
   if(newkeys & KEY_CROUCH)
   {
      if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"BS:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
//   new string[100];
   if(IsPlayerInRangeOfPoint(playerid, 10.0, 1590.4000244141, -1638, 15.199999809265)) //PD KAPIJA
   {
      if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1)
      {
         MoveDynamicObject(kapijapd1,1597.4000244141, -1638 ,15.199999809265, 2.00);
         KapijeTimer[playerid] = SetTimer("pdkapija1", 7000, 0);
         format(string, sizeof(string), "* %s otvara kapiju.", GetName(playerid));
         ProxDetector(20.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
         SCM(playerid,-1,""PLAVA"LSPD | "BIJELA"Kapija je otvorena i zatvorice se automacki!");
      }
      else return SCM(playerid,-1, ""PLAVA"[LSPD] "BIJELA"Samo clanovi LSPD!");
   }
   else if(IsPlayerInRangeOfPoint(playerid, 10.0,1544.6999511719, -1630.8000488281, 13.10000038147)) //PD RAMPA
   {
       if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1)
       {
           DestroyDynamicObject(pdrampazatvorena);
         pdrampaotvorena = CreateDynamicObject(968, 1544.6999511719, -1630.8000488281, 13.10000038147, 0, 353.99993896484, 269.99996948242);
         KapijeTimer[playerid] = SetTimer("pdrampazatvori", 7000, 0);
         format(string, sizeof(string), "* %s otvara rampu.", GetName(playerid));
         ProxDetector(20.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
         SCM(playerid,-1,""PLAVA"LSPD | "BIJELA"Rampa je otvorena i zatvorice se automacki!");
      }
      else return SCM(playerid,-1, ""PLAVA"[LSPD] "BIJELA"Samo clanovi LSPD!");
   }
   else if(IsPlayerInRangeOfPoint(playerid, 10.0, 1487.04, -1762.43, 3284.27))   // PD MINI ZATVOR
   {
      if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1)
      {
         MoveDynamicObject(lspdz, 1487.04, -1761.07, 3284.27, 2.0);
         KapijeTimer[playerid] = SetTimer("Zatvaranje1", 7000, 0);
            format(string, sizeof(string), "* %s uzima kljuc i otvara vrata.", GetName(playerid));
         ProxDetector(30.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
         SCM(playerid,-1,""PLAVA"LSPD | "BIJELA"Vrata su otvorena i zatvorice se automacki!");
      }
      else return SCM(playerid,-1, ""PLAVA"[LSPD] "BIJELA"Samo clanovi LSPD!");
   }
   else if(IsPlayerInRangeOfPoint(playerid, 10.0, 2234.4287, -2215.4099, 13.5469))   // TVF KAPIJA
   {
      if(PlayerInfo[playerid][pClan] == 2 || PlayerInfo[playerid][pLider] == 2)
      {
         MoveDynamicObject(tvfkapija1, 2239.8999023438, -2220.8999023438, 14.39999961853, 2.0);
            MoveDynamicObject(tvfkapija2, 2228.8000488281, -2210, 14.39999961853, 2.0);
         KapijeTimer[playerid] = SetTimer("ZatvaranjeTVF", 7000, 0);
            format(string, sizeof(string), "* %s otvara kapiju.", GetName(playerid));
         ProxDetector(30.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
         SCM(playerid,-1,""CRVENA"TVF | "BIJELA"Kapija je otvorena i zatvorice se automacki!");
      }
      else return SCM(playerid,-1, ""CRVENA"[TVF]: "BIJELA"Samo clanovi TVF!");
   }
   else if(IsPlayerInRangeOfPoint(playerid, 10.0, 2178.9497, -2254.9697, 14.7734))   // TVF GARAZA
   {
      if(PlayerInfo[playerid][pClan] == 2 || PlayerInfo[playerid][pLider] == 2)
      {
         MoveDynamicObject(tvfgaraza, 2178, -2255.3999023438, 18.799999237061, 2.0);
         KapijeTimer[playerid] = SetTimer("ZatvaranjeTVFG", 7000, 0);
            format(string, sizeof(string), "* %s otvara garazu.", GetName(playerid));
         ProxDetector(30.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
         SCM(playerid,-1,""CRVENA"TVF | "BIJELA"Garaza je otvorena i zatvorice se automacki!");
      }
      else return SCM(playerid,-1, ""CRVENA"[TVF]: "BIJELA"Samo clanovi TVF!");
   }
   else if(IsPlayerInRangeOfPoint(playerid, 10.0, 1245.1999511719, -767, 93.900001525879))   // BDT KAPIJA
   {
      if(PlayerInfo[playerid][pClan] == 3 || PlayerInfo[playerid][pLider] == 3)
      {
         MoveDynamicObject(bdtkapija, 1255.6999511719, -766.90002441406, 93.900001525879, 2.0);
         KapijeTimer[playerid] = SetTimer("ZatvaranjeBDT", 7000, 0);
            format(string, sizeof(string), "* %s otvara kapiju.", GetName(playerid));
         ProxDetector(30.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
         SCM(playerid,-1,""ZUTA"BDT | "BIJELA"Kapija je otvorena i zatvorice se automacki!");
      }
      else return SCM(playerid,-1, ""ZUTA"[BDT]: "BIJELA"Samo clanovi BDT!");
   }
   else if(IsPlayerInRangeOfPoint(playerid, 10.0, -1079.0999755859, -1647, 76.300003051758))   // BDT MESTO ZA DROGU
   {
      if(PlayerInfo[playerid][pClan] == 3 || PlayerInfo[playerid][pLider] == 3)
      {
         MoveDynamicObject(bdtdroga, -1079, -1641.8000488281, 76.300003051758, 2.0);
         KapijeTimer[playerid] = SetTimer("ZatvaranjeBDTD", 7000, 0);
            format(string, sizeof(string), "* %s otvara kapiju.", GetName(playerid));
         ProxDetector(30.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
         SCM(playerid,-1,""ZUTA"BDT | "BIJELA"Kapija je otvorena i zatvorice se automacki!");
      }
      else return SCM(playerid,-1, ""ZUTA"[BDT]: "BIJELA"Samo clanovi BDT!");
   }
             return 1;
    }
[/pawn]


format(string, sizeof(string), "* %s otvara kapiju.", GetName(playerid)); tu su errori na ovo string mozda niasm dobro ubacio dje trebam ovo da ubacim


da tu sam i stavio ali ima warninge na ovo string



dodaj ovo odma ispod public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
new string[256];

   if(IsPlayerInRangeOfPoint(playerid, 10.0, 1590.4000244141, -1638, 15.199999809265)) //PD KAPIJA
   {
ima i odje warning