[pomoc] /gateopen

Započeo sampzone, Jun 12, 2011, 14:22:42 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

mop koji ja koristim: BU

problem: imam komandu /gateopen i izpod toga negdje oko 10 kapija da se otvara sa tom komandom...pravio sma nove kapije dodavao i sve rade al sad sam dodao kapiju od parking servisa...sve uradio i kada dodjem do kapije pise destinacija je rpevise udaljena...sve sam pregledo kordinate odakle se otvraju...sve je dobro ali nece...

dio skripte: evo vam dio komande pomocu koje se otvara baza..else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
    if (PlayerToPoint(15, playerid,777.8810,-1330.1421,13.5500))
    {
        MoveDynamicObject(kps, 781.638671875, -1330.544921875, 12.549224853516,1);
        SetTimer("zatvorips", 7000, 0);
        SendClientMessage(playerid, COLOR_BLUE,"Parking Servis je otvorena i zatvorice se za 7 sekundi.");
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s uzima daljinski i otvara Parking Servis kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
}
else return SendClientMessage(playerid, COLOR_GREY,"Nemate daljinski od kapije/rampe.");
    return 1;
}


slike:/

Hvala za pomoc unaprijed!

Da li su ti koordinate tacne kod  if (PlayerToPoint(15, playerid,777.8810,-1330.1421,13.5500)) i da li si siguran da ti je ps id 11?

a omg daj postaj cijeli GM tu, svoje zelje i ljudi ce ti iskriptat i ti otvori... -.-

pa imas 10 ovakvih tema, samo trebas upisat kapija i amen.


samo ubaci koordinate kada bude blizu vrata da ih moze otvorit

MTA.user ne pametuj....nimsa budala da neznam napraviti kapiju....i nemoj da spamas.... a ps je id 11 a kordiante sam 1000 puta provjerio

Citat: sampzone poslato Jun 12, 2011, 14:43:49 POSLE PODNE
MTA.user ne pametuj....nimsa budala da neznam napraviti kapiju....i nemoj da spamas.... a ps je id 11 a kordiante sam 1000 puta provjerio
Jesi li ti siguran da nisi budala,ja verujem samo rezultatima iz bolnice ;) Btw, mora da ti je do koordinata ...Pogledaj jos jednom,ne moze ti biti ni do cega drugog....

Moze biti do jos jednog a to je ako ti taj gateopen od psa nije zadnji a ubacio si return

primer :

else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
    if (PlayerToPoint(15, playerid,777.8810,-1330.1421,13.5500))
    {
        MoveDynamicObject(kps, 781.638671875, -1330.544921875, 12.549224853516,1);
        SetTimer("zatvorips", 7000, 0);
        SendClientMessage(playerid, COLOR_BLUE,"Parking Servis je otvorena i zatvorice se za 7 sekundi.");
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s uzima daljinski i otvara Parking Servis kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
    if (PlayerToPoint(15, playerid,777.8810,-1330.1421,13.5500))
    {
        MoveDynamicObject(kps, 781.638671875, -1330.544921875, 12.549224853516,1);
        SetTimer("zatvorips", 7000, 0);
        SendClientMessage(playerid, COLOR_BLUE,"Parking Servis je otvorena i zatvorice se za 7 sekundi.");
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s uzima daljinski i otvara Parking Servis kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
}
else return SendClientMessage(playerid, COLOR_GREY,"Nemate daljinski od kapije/rampe.");
    return 1;
}

evo dacu ti cjelu /gateopen komandu
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][pLeader] == 11 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 11)
    {
        if (PlayerToPoint(15, playerid,1589.053344,-1638.123168,14.122960))
{
      MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
      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.", 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,1544.700317,-1630.735717,13.096980))
{
      DestroyDynamicObject( pdgate2 );
      pdgate3 = CreateDynamicObject(968,1544.700317,-1630.735717,12.924660,0.000000,0.000000,270.972869);
      SetTimer("GateClose5", 6000, 0);
      SendClientMessage(playerid, COLOR_BLUE,"Kapija je otvorena i zatvorice se za 6 sekundi.");
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "* %s uzima daljinski i otvara kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if (PlayerToPoint(15, playerid,2720.3772,-2409.7523,12.6))
{
      MoveDynamicObject(armygate1,2720.3772, -2401.2523, 12.6, 3.5);
      SetTimer("GateClose2", 7000, 0);
      SendClientMessage(playerid, COLOR_BLUE,"SWAT Kapija 1 je otvorena i zatvorice se za 7 sekundi.");
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "* %s uzima daljinski i otvara SWAT Kapiju 1.", 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);
      SetTimer("GateClose2", 7000, 0);
      SendClientMessage(playerid, COLOR_BLUE,"SWAT KAPIJA 2 je otvorena i zatvorice se za 7 sekundi.");
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "* %s uzima daljinski i otvara SWAT Kapiju 2.", 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);
      SetTimer("GateClose3", 7000, 0);
      SendClientMessage(playerid, COLOR_BLUE,"FBI kapija je otvorena i zatvorice se za 7 sekundi.");
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "* %s uzima daljinski i otvara FBI kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
//SFPD KAPIJA
else if (PlayerToPoint(15, playerid,-1636.5587158203,688.26141357422,8.9608917236328))
{
      MoveDynamicObject(sfpdgate,-1646.0587158203,688.26141357422,8.9608917236328, 1.5);
      MoveDynamicObject(sfpdgate1,-1617.5162353516,688.26141357422,8.9608917236328, 1.5);
      SetTimer("GateClose9", 7000, 0);
      SendClientMessage(playerid, COLOR_BLUE,"SFPD kapija je otvorena i zatvorice se za 7 sekundi.");
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "* %s uzima daljinski i otvara SFPD kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
//SFPD RAMPA 1
else if (PlayerToPoint(15, playerid,-1572.2039794922,658.83715820313,6.8781242370605))
{
      DestroyDynamicObject( sfpdrampa );
      sfpdrampa1 = CreateDynamicObject(968,-1572.2039794922,658.83715820313,6.8781242370605,0,0,90)
      SetTimer("GateClose10", 7000, 0);
      SendClientMessage(playerid, COLOR_BLUE,"SFPD 1 rampa je otvorena i zatvorice se za 7 sekundi.");
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "* %s uzima daljinski i otvara SFPD 1 rampu.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
//SFPD RAMPA 2
else if (PlayerToPoint(15, playerid,-1701.4404296875,687.60888671875,24.632816314697))
{
      DestroyDynamicObject( sfpdrampa2 );
      sfpdrampa3 = CreateDynamicObject(968,-1701.4404296875,687.60888671875,24.632816314697,0,0,90)
      SetTimer("GateClose11", 7000, 0);
      SendClientMessage(playerid, COLOR_BLUE,"SFPD 2 rampa je otvorena i zatvorice se za 7 sekundi.");
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "* %s uzima daljinski i otvara SFPD 2 rampu.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
}
else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
{
    if (PlayerToPoint(15, playerid,1283.8721923828,-2056.623046875,57.79080581665))
    {
        MoveDynamicObject(lcngate, 1284.6973876958, -2056.69921875, 66.518, 1);
        SetTimer("GateClose6", 10000, 0);
        SendClientMessage(playerid, COLOR_BLUE,"LCN Kapija je otvorena i zatvorice se za 7 sekundi.");
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s uzima daljinski i otvara LCN kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
}
else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
{
    if (PlayerToPoint(15, playerid,1245.3275146484,-767.20440673828,93.842063903809))
    {
        MoveDynamicObject(yakuzagate,1245.3275146484,-767.20440673828,98.517349243164,1);
        SetTimer("GateClose7", 10000, 0);
        SendClientMessage(playerid, COLOR_BLUE,"Yakuza Kapija je otvorena i zatvorice se za 7 sekundi.");
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s uzima daljinski i otvara Yakuza kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
}
    else if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
{
    if (PlayerToPoint(15, playerid,1023.7610473633,-369.64624023438,75.441772460938))
    {
        MoveDynamicObject(hitmangate,1023.7610473633,-369.64624023438,81.191772460938,1);
        SetTimer("GateClose8", 10000, 0);
        SendClientMessage(playerid, COLOR_BLUE,"Hitman kapija je otvorena i zatvorice se za 7 sekundi.");
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s uzima daljinski i otvara Hitman kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
}
else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
{
    if (PlayerToPoint(15, playerid,1273.2890625,-1843.2409667969,13.140628814697))
    {
        DestroyDynamicObject( taxigate );
            taxigate1 = CreateDynamicObject(968,1273.2890625,-1843.2409667969,13.140628814697,0,0,0)
        SetTimer("TaxiGateClose", 8000, 0);
        SendClientMessage(playerid, COLOR_BLUE,"Taxi rampa je otvorena i zatvorice se za 7 sekundi.");
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s uzima daljinski i otvara Taxi rampu.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
}
else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
{
    if (PlayerToPoint(15, playerid,-2127.4079589844,-80.801971435547,37.093704223633))
    {
        MoveDynamicObject(rusgate,-2127.4079589844,-80.801971435547,42.818748474121,1);
        SetTimer("rusgateclose", 10000, 0);
        SendClientMessage(playerid, COLOR_BLUE,"RM Kapija je otvorena i zatvorice se za 7 sekundi.");
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s uzima daljinski i otvara RM kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
}
//ballas,blods
else if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
{
    if (PlayerToPoint(15, playerid,1809.5450,-2113.0176,13.3828))
    {
        MoveDynamicObject(kballas,1809.9853515625, -2123.9228515625, 15.156204223633,1);
        SetTimer("zatvorib", 10000, 0);
        SendClientMessage(playerid, COLOR_BLUE,"Blods Kapija je otvorena i zatvorice se za 10 sekundi.");
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s uzima daljinski i otvara Blods kapiju.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
}
else return SendClientMessage(playerid, COLOR_GREY,"Nemate daljinski od kapije/rampe.");
    return 1;
}

if(!strcmp(cmdtext, "/tuningopen", true)) // by Ellis
{
    if(PlayerInfo[playerid][pLeader] == 6)
    {
        if (PlayerToPoint(30, playerid,1042.2530,-1026.0344,32.1016))
{
      MoveDynamicObject(tugate, 1049.2530,-1026.0344,31.1016, 3.5000);
      SendClientMessage(playerid, COLOR_BLUE,"Kapija Tuning Centra je otvorena");
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "* %s uzima daljinski i otvara kapiju tuning centra.", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena."); }
}
else return SendClientMessage(playerid, COLOR_GREY,"Nemate daljinski za otvaranje te kapije.");
return 1;
}

Bolje zaljepi ono sta ide u OnGameModeInit...CreateDynamicObject, mozda si fulao koordinate kod PlayerToPoint

Shone

Buraz de ti nama reci jesi li definisao kordinate, i public GateClose?

BTW: A usput nam i posalji cele kordinate!


Shone

I ja ako malo bolje pogledam, "777.8810,-1330.1421,13.5500" To popravi brate to ti je glavno i radice ti 100%