Jump to content
  • 0

Problema Porti si usa pd!


PicOlo

Question

public GateClose(playerid)

{

      MoveObject(pdgate1,1589.053344,-1638.123168,14.122960, 0.97);

      PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);

      return 1;

}

public GateClose2()

{

      MoveObject(armygate1,2720.3772, -2409.7523, 12.6, 2.5);

      MoveObject(armygate2,2720.3772, -2508.3069, 12.6, 2.5);

      return 1;

}

public GateClose3()

{

      MoveObject(fbigate, 1534.9020,-1451.5979,14.4882, 1.5);

      return 1;

}

public GateClose4()

{

      MoveObject(hspdgate, 1643.3379,-1714.9338,15.3067, 1.5);

      return 1;

}

public GateClose5()

{

      DestroyObject( pdgate3 );

      pdgate2 = CreateDynamicObject(968,1544.700317,-1630.735717,13.096980,-1.000000,-91.000000,269.972869);

      return 1;

}

public GateClose6()

{

      MoveObject(lucianogate, 1246.0033,-767.3727,91.1473, 1.5);

  return 1;

}

/*public GateClose7()

{

      MoveObject(iorgate, 2796.1454,-1600.2020,10.1297, 1.5);

  return 1;

}*/

public elevator1(playerid)

{

      SetPlayerPos(playerid,1174.9591,-1374.8761,23.9736);

      return 1;

}

Nu merge sa deschid usa si portile de la garaj si bariera

asteas obiectele

pdgate1 = CreateDynamicObject(971,1589.053344,-1638.123168,14.122960,0.000000,0.000000,180);

pdgate2 = CreateDynamicObject(968,1544.700317,-1630.735717,13.096980,-1.000000,-91.000000,269.972869);

hspdgate = CreateDynamicObject(971, 1643.3379,-1714.9338,15.3067,0, 0.0000, 90);

lspddoor1 = CreateDynamicObject(1500, 245.0578,72.4314,1002.5406,0, 0.0000, 0.0000);

lspddoor2 = CreateDynamicObject(1500, 245.9478,72.4314,1002.5406,0, 0.0000, 0.0000);

Astea sunt cele care nu merg portile si usa ....... scriu comanda (gate/door) care o am in gm sa le deschid, imi apare textu si nu se intampla nimic!

comanda /gate

if(!strcmp(cmdtext, "/gate", 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,1589.053344,-1638.123168,14.122960))

{

      MoveObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);

      SetTimer("GateClose", 12000, 0);

      SendClientMessage(playerid, COLOR_BLUE,"Poarta a fost deschisa! Se va inchide in 7 secunde.");

      GetPlayerName(playerid, sendername, sizeof(sendername));

      format(string, sizeof(string), "* %s takes his/her remote and opens a garage.", 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))

{

      DestroyObject( pdgate2 );

      pdgate3 = CreateDynamicObject(968,1544.700317,-1630.735717,12.924660,0.000000,0.000000,270.972869);

      SetTimer("GateClose5", 6000, 0);

      SendClientMessage(playerid, COLOR_BLUE,Poarta a fost deschisa! Se va inchide in 6 secunde.");

      GetPlayerName(playerid, sendername, sizeof(sendername));

      format(string, sizeof(string), "* %s takes his/her remote and opens the gate.", 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))

{

      MoveObject(armygate1,2720.3772, -2401.2523, 12.6, 3.5);

      SetTimer("GateClose2", 7000, 0);

      SendClientMessage(playerid, COLOR_BLUE,"The Army gate Nr. 1 is opened and will close in 7 seconds.");

      GetPlayerName(playerid, sendername, sizeof(sendername));

      format(string, sizeof(string), "* %s takes his/her remote and opens the army gate #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))

{

      MoveObject(armygate2,2720.3772, -2499.8069, 12.6, 3.5);

      SetTimer("GateClose2", 7000, 0);

      SendClientMessage(playerid, COLOR_BLUE,"The Army gate Nr. 2 is opened and will close in 7 seconds.");

      GetPlayerName(playerid, sendername, sizeof(sendername));

      format(string, sizeof(string), "* %s takes his/her remote and opens the army gate #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))

{

      MoveObject(fbigate,1534.9020,-1451.5979,20.4882, 1.5);

      SetTimer("GateClose3", 7000, 0);

      SendClientMessage(playerid, COLOR_BLUE,"FBI gate is opened and will close in 7 seconds.");

      GetPlayerName(playerid, sendername, sizeof(sendername));

      format(string, sizeof(string), "* %s takes his/her remote and opens fbi gate.", 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))

{

      MoveObject(hspdgate,1643.3379,-1705.9338,15.3067, 1.5);

      SetTimer("GateClose4", 7000, 0);

      SendClientMessage(playerid, COLOR_BLUE,"HSPD gate is opened and will close in 7 seconds.");

      GetPlayerName(playerid, sendername, sizeof(sendername));

      format(string, sizeof(string), "* %s takes his/her remote and opens hspd gate.", sendername);

      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

}

else { SendClientMessage(playerid, COLOR_GREY,"Destination is too far."); }

}

else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)

{

    if (PlayerToPoint(15, playerid,1246.0033,-767.3727,91.1473))

    {

        MoveObject(lucianogate,1256.2033,-767.3727,91.1473, 2.2);

        SetTimer("GateClose6", 7000, 0);

        GetPlayerName(playerid, sendername, sizeof(sendername));

        format(string, sizeof(string), "* %s takes his/her remote and opens La Famiglia Sinatra hq gate.", sendername);

      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

    }

    else { SendClientMessage(playerid, COLOR_GREY,"Destination is too far."); }

}

/*else if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)

{

    if (PlayerToPoint(15, playerid,2796.1454,-1600.2020,10.1297))

    {

        MoveObject(iorgate,2786.1454,-1600.2020,10.1297, 2.2);

        SetTimer("GateClose7", 7000, 0);

        GetPlayerName(playerid, sendername, sizeof(sendername));

        format(string, sizeof(string), "* %s takes his/her remote and opens institute of race hq gate.", sendername);

      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

    }

    else { SendClientMessage(playerid, COLOR_GREY,"Destination is too far."); }

}*/

else return SendClientMessage(playerid, COLOR_GREY,"You don't have a remote control.");

    return 1;

}

Comanda pt usa

if(!strcmp(cmdtext, "/door", 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(30, playerid,245.0578,72.4314,1002.5406))

{

      MoveObject(lspddoor1, 244.0578,72.4314,1002.5406, 3.5000);

      MoveObject(lspddoor2, 247.1478,72.4314,1002.5406, 3.5000);

      SendClientMessage(playerid, COLOR_BLUE,"LSPD door is open, please close it!");

      GetPlayerName(playerid, sendername, sizeof(sendername));

      format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);

      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

      }

      else { SendClientMessage(playerid, COLOR_GREY,"Destination is too far."); }

}

else return SendClientMessage(playerid, COLOR_GREY,"You don't have a remote control to open that.");

return 1;

}

if(!strcmp(cmdtext, "/doorclose", 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(30, playerid,245.0578,72.4314,1002.5406))

{

      MoveObject(lspddoor1, 245.0578,72.4314,1002.5406, 3.5000);

      MoveObject(lspddoor2, 245.9478,72.4314,1002.5406, 3.5000);

      SendClientMessage(playerid, COLOR_BLUE,"LSPD door is closed, thank you!");

      GetPlayerName(playerid, sendername, sizeof(sendername));

      format(string, sizeof(string), "* %s takes his/her remote control and closes the door.", sendername);

      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

      }

      else { SendClientMessage(playerid, COLOR_GREY,"Destination is too far."); }

}

else return SendClientMessage(playerid, COLOR_GREY,"You don't have a remote control to close that.");

return 1;

}

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.