[POMOC] /otvori /zatvori

Započeo Glisa, Januar 31, 2013, 22:18:14 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: NL
Detaljan opis problema: Svaki igrac moze /otvori /zatvori iako nije clan te organizacije
Dio skripte: CMD:otvori(playerid, params[])
{
new hIme[MAX_PLAYER_NAME];
RPIme(playerid, hIme);
if(IsPlayerInRangeOfPoint(playerid, 25.0, 1588.41125488, -1638.09802246, 15.12577248)) //PD
{
if(IgracPolicajac(playerid) || IsPlayerAdmin(playerid))
{
    MoveDynamicObject(pdkapija, 1598.41113281, -1638.09765625, 15.12577248, 2.5);
        SCM(playerid, BELA, "| PD | {BFC0C2}otvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan PD/FBI/SWAT, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 25.0, 1622.2909,-1860.4635,13.5507)) // Strugara
{
    if(PI[playerid][Posao] == POSAO_DRVOSECA || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(drvosecakapija, 1642.26733398,-1860.89221191,13.85636234, 2.5);
        SCM(playerid, BELA, "| Strugara | {BFC0C2}otvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste zaposleni u strugari, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 25.0, 1643.50402832,-1718.33447266,14.80937481)) // FBI
{
    if(IgracPolicajac(playerid) || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(fbikapija, 1643.50402832,-1711.93444824,14.80937481,2.500);
        SCM(playerid, BELA, "| FBI | {BFC0C2}otvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan PD/FBI/SWAT, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 25.0, 1506.50244141,-1342.02062988,16.96203995)) // Hitman
{
    if(PI[playerid][Clan] == 8 || PI[playerid][Lider] == 8 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(hitmanvrata, 1506.50244141,-1342.02062988,9.0620403289795,3.000);
        SCM(playerid, BELA, "| LSCA | {BFC0C2}otvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste zaposleni u agenciji, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 1214.68786621,-1842.05627441,14.05750275)) // Taxi 1
{
    if(PI[playerid][Posao] == POSAO_TAKSISTA || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(taxikapija[0], 1223.49877930,-1842.23828125,14.05750275,3.000);
        SCM(playerid, BELA, "| Taxi Company | {BFC0C2}otvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste zaposleni u Taxi Kompaniji, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 1270.04748535,-1841.98120117,14.07211113)) // Taxi 2
{
    if(PI[playerid][Posao] == POSAO_TAKSISTA || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(taxikapija[1], 1278.81311035,-1842.06762695,14.07211113,3.000);
        SCM(playerid, BELA, "| Taxi Company | {BFC0C2}otvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste zaposleni u Taxi Kompaniji, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 25.0, 2231.34960938,-2212.78417969,13.80136967)) // LSB KAPIJE
{
    if(PI[playerid][Clan] == 12 || PI[playerid][Lider] == 12 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(lsbkapija[0], 2226.58203125,-2207.8642578125,13.801369667053,2.500);
MoveDynamicObject(lsbkapija[1], 2241.7060546875,-2223.2509765625,13.801369667053,2.500);
        SCM(playerid, BELA, "| LSB | {BFC0C2}otvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan bande, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 2178.61621094,-2255.15771484,16.04496765)) // LSB VRATA
{
    if(PI[playerid][Clan] == 12 || PI[playerid][Lider] == 12 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(lsbvrata, 2178.61621094,-2255.15771484,19.74496765, 2.500);
        SCM(playerid, BELA, "| LSB | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan bande, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 313.41583252,-1558.09680176,31.15325928)) // SWAT KAPIJA 1
{
    if(PI[playerid][Clan] == 3 || PI[playerid][Lider] == 3 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(swatkapija1, 308.04602050781, -1554.0064697266, 31.153259277344, 2.500);
        SCM(playerid, BELA, "| SWAT | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan bande, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 366.98184204,-1465.99951172,30.30373955)) // SWAT KAPIJA 2
{
    if(PI[playerid][Clan] == 3 || PI[playerid][Lider] == 3 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(swatkapija2, 361.46960449219, -1470.7108154297, 30.303739547729, 2.500);
        SCM(playerid, BELA, "| SWAT | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan SWAT, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 2812.47119141,-1468.45385742,16.96561432)) // NGR KAPIJA
{
    if(PI[playerid][Clan] == 13 || PI[playerid][Lider] == 13 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(ngrkapija, 2803.57128906,-1468.45385742,16.96561432, 2.500);
        SCM(playerid, BELA, "| NGR | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan NGR, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 35.0, 2313.50000000,-1221.72546387,25.81230736)) // BMC KAPIJE
{
    if(PI[playerid][Clan] == 14 || PI[playerid][Lider] == 14 || IsPlayerAdmin(playerid))
    {
        new kapija;
        if(sscanf(params, "i", kapija)) return Koristite(playerid, "otvori [Broj kapije (1 = ulaz napred, 2 = ulaz pozadi, 3 = garaza napred, 4 = garaza pozadi)]");
        if(kapija == 1) // mala napred
        {
        MoveDynamicObject(bmckapija[1], 2313.50000000,-1226.3068847656,25.81230736, 2.500);
        SCM(playerid, BELA, "| BMC | {BFC0C2}otvarate prednja vrata baze.");
}
else if(kapija == 2) // mala pozadi
{
        MoveDynamicObject(bmckapija[2], 2360.9714,-1258.9733,24.0297, 2.500);
        SCM(playerid, BELA, "| BMC | {BFC0C2}otvarate zadnja vrata garaze.");
}
else if(kapija == 3) // garaza napred
{
        MoveDynamicObject(bmckapija[0], 2313.60351562,-1222.36962891,19.557441711426, 2.500);
        SCM(playerid, BELA, "| BMC | {BFC0C2}otvarate prednja vrata garaze.");
}
else if(kapija == 4) // garaza pozadi
{
        MoveDynamicObject(bmckapija[3], 2360.5886,-1269.0974,23.9396, 2.500);
        SCM(playerid, BELA, "| BMC | {BFC0C2}otvarate zadnja vrata garaze.");
}
else return SCM(playerid, GRAD2, "(Greška) Broj kapije moze biti samo 1, 2, 3 ili 4!");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan BMC, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 2223.065429,-1144.285156,24.80942535)) // ICF KAPIJA
{
    if(PI[playerid][Clan] == 15 || PI[playerid][Lider] == 15 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(icfkapija, 2223.065429,-1144.285156,24.80942535, 2.500);
        SCM(playerid, BELA, "| ICF | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan ICF, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 815.00097656,-1439.51232910,16.42875290)) // RM KAPIJA
{
    if(PI[playerid][Clan] == 17 || PI[playerid][Lider] == 17 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(rmkapija1, 815.00097656,-1430.7122802734,16.42875290, 2.500);
        SCM(playerid, BELA, "| RM | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan RM, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 867.29101562,-1471.00756836,16.52072906)) // RM KAPIJA
{
    if(PI[playerid][Clan] == 17 || PI[playerid][Lider] == 17 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(rmkapija2, 857.19101562,-1471.00756836,16.52072906, 2.500);
        SCM(playerid, BELA, "| RM | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "(Greška) Niste clan RM, ne mozete pomerati ova vrata.");
}



  CMD:zatvori(playerid, params[])
{
new hIme[MAX_PLAYER_NAME];
RPIme(playerid, hIme);
if(IsPlayerInRangeOfPoint(playerid, 25.0, 1588.41125488, -1638.09802246, 15.12577248)) //PD
{
if(PI[playerid][Clan] != 1 && PI[playerid][Lider] != 1) return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan PD/FBI/SWAT, ne mozete pomerati ovu kapiju.");
MoveDynamicObject(pdkapija, 1588.41125488, -1638.09802246, 15.12577248, 2.5);
        SCM(playerid, BELA, "| PD | {BFC0C2}zatvarate kapiju baze.");
}
else if(IsPlayerInRangeOfPoint(playerid, 25.0, 1622.2909,-1860.4635,13.5507)) // Strugara
{
    if(PI[playerid][Posao] == POSAO_DRVOSECA || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(drvosecakapija, 2539.10009766,-2226.80004883,10.89999962, 2.5);
        SCM(playerid, BELA, "| Strugara | {BFC0C2}zatvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste zaposleni u strugari, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 2539.10009766,-2226.80004883,10.89999962)) // Kamiondzija
{
    if(PI[playerid][Posao] == POSAO_KAMIONDIJA || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(kamion, 2539.10009766,-2226.80004883,13.69999981, 3.000);
        SCM(playerid, BELA, "| Vozac Kamiona | {BFC0C2}zatvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste zaposleni kao Vozac Kamiona, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 25.0, 1643.50402832,-1718.33447266,14.80937481)) // FBI
{
    if(IgracPolicajac(playerid) || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(fbikapija, 1643.50402832,-1718.33447266,14.80937481,2.500);
        SCM(playerid, BELA, "| FBI | {BFC0C2}zatvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan PD/FBI/SWAT, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 25.0, 1506.50244141,-1342.02062988,16.96203995)) // Hitman
{
    if(PI[playerid][Clan] == 8 || PI[playerid][Lider] == 8 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(hitmanvrata, 1506.50244141,-1342.02062988,16.96203995,3.000);
        SCM(playerid, BELA, "| LSCA | {BFC0C2}zatvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste zaposleni u agenciji, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 1214.68786621,-1842.05627441,14.05750275)) // Taxi 1
{
    if(PI[playerid][Posao] == POSAO_TAKSISTA || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(taxikapija[0], 1214.68786621,-1842.05627441,14.05750275,3.000);
        SCM(playerid, BELA, "| Taxi Company | {BFC0C2}zatvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste zaposleni u Taxi Kompaniji, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 1270.04748535,-1841.98120117,14.07211113)) // Taxi 2
{
    if(PI[playerid][Posao] == POSAO_TAKSISTA || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(taxikapija[1], 1270.04748535,-1841.98120117,14.07211113,3.000);
        SCM(playerid, BELA, "| Taxi Company | {BFC0C2}zatvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste zaposleni u Taxi Kompaniji, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 25.0, 2231.34960938,-2212.78417969,13.80136967)) // LSB KAPIJE
{
    if(PI[playerid][Clan] == 12 || PI[playerid][Lider] == 13 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(lsbkapija[0], 2231.34960938,-2212.78417969,13.80136967,2.500);
MoveDynamicObject(lsbkapija[1], 2236.90625000,-2218.44287109,13.80136967,2.500);
        SCM(playerid, BELA, "| LSB | {BFC0C2}otvarate kapiju baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan bande, ne mozete pomerati ovu kapiju.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 2178.61621094,-2255.15771484,16.04496765)) // LSB VRATA
{
    if(PI[playerid][Clan] == 12 || PI[playerid][Lider] == 13 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(lsbvrata, 2178.61621094,-2255.15771484,16.04496765, 2.500);
        SCM(playerid, BELA, "| LSB | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan bande, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 313.41583252,-1558.09680176,31.15325928)) // SWAT KAPIJA 1
{
    if(PI[playerid][Clan] == 3 || PI[playerid][Lider] == 3 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(swatkapija1, 313.41583252, -1558.09680176, 31.15325928, 2.500);
        SCM(playerid, BELA, "| SWAT | {BFC0C2}zatvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan bande, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 366.98184204,-1465.99951172,30.30373955)) // SWAT KAPIJA 2
{
    if(PI[playerid][Clan] == 3 || PI[playerid][Lider] == 3 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(swatkapija2, 366.98184204, -1465.99951172, 30.30373955, 2.500);
        SCM(playerid, BELA, "| SWAT | {BFC0C2}zatvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan SWAT, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 2803.57128906,-1468.45385742,16.96561432)) // NGR KAPIJA
{
    if(PI[playerid][Clan] == 13 || PI[playerid][Lider] == 13 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(ngrkapija, 2812.47128906,-1468.45385742,16.96561432, 2.500);
        SCM(playerid, BELA, "| NGR | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan NGR, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 2313.50000000,-1221.72546387,25.81230736)) // BMC KAPIJE
{
    if(PI[playerid][Clan] == 14 || PI[playerid][Lider] == 14 || IsPlayerAdmin(playerid))
    {
        new kapija;
        if(sscanf(params, "i", kapija)) return Koristite(playerid, "otvori [Broj kapije (1 = ulaz napred, 2 = ulaz pozadi, 3 = garaza napred, 4 = garaza pozadi)]");
        if(kapija == 1) // mala napred
        {
        MoveDynamicObject(bmckapija[1], 2313.50000000,-1224.72546387,25.81230736, 2.500);
        SCM(playerid, BELA, "| BMC | {BFC0C2}zatvarate prednja vrata baze.");
}
else if(kapija == 2) // mala pozadi
{
        MoveDynamicObject(bmckapija[2], 2360.9714,-1258.9733,24.0297, 2.500);
        SCM(playerid, BELA, "| BMC | {BFC0C2}zatvarate zadnja vrata garaze.");
}
else if(kapija == 3) // garaza napred
{
        MoveDynamicObject(bmckapija[0], 2313.60351562,-1222.36962891,22.85056390762329, 2.500);
        SCM(playerid, BELA, "| BMC | {BFC0C2}zatvarate prednja vrata garaze.");
}
else if(kapija == 4) // garaza pozadi
{
        MoveDynamicObject(bmckapija[3], 2360.5886,-1269.0974,23.9396, 2.500);
        SCM(playerid, BELA, "| BMC | {BFC0C2}zatvarate zadnja vrata garaze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Broj kapije moze biti samo 1, 2, 3 ili 4!");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan BMC, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 2223.065429,-1144.285156,24.80942535)) // ICF KAPIJA
{
    if(PI[playerid][Clan] == 15 || PI[playerid][Lider] == 15 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(icfkapija, 2216.04980469,-1142.25708008,24.80942535, 2.500);
        SCM(playerid, BELA, "| ICF | {BFC0C2}zatvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan ICF, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 815.00097656,-1439.51232910,16.42875290)) // RM KAPIJA
{
    if(PI[playerid][Clan] == 17 || PI[playerid][Lider] == 17 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(rmkapija1, 815.00097656,-1439.51232910,16.42875290, 2.500);
        SCM(playerid, BELA, "| RM | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan RM, ne mozete pomerati ova vrata.");
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 867.19101562,-1471.00756836,16.52072906)) // RM KAPIJA
{
    if(PI[playerid][Clan] == 17 || PI[playerid][Lider] == 17 || IsPlayerAdmin(playerid))
    {
        MoveDynamicObject(rmkapija2, 867.29101562,-1471.00756836,16.52072906, 2.500);
        SCM(playerid, BELA, "| RM | {BFC0C2}otvarate vrata baze.");
}
else return SCM(playerid, GRAD2, "{BFC0C2}(Greška) Niste clan RM, ne mozete pomerati ova vrata.");
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): //

Provjeri kako ti je definirano
Public IgracPolicajac