[Add-On] Police Gates (GF)
#22

I've had a few requests on how to add the damn thing into the gf. It's pritty simple. I'll try tell you how and keep it short at the same time.

Now, at the top of the script, where all you 'new' things are, add the following.
pawn Код:
new LSPDBarrier1;
new LSPDGate1;
new SFPDBarrier1;
new SFPDBarrier2;
new SFPDGate1;
new LVPDBarrier1;
new LVPDGate1;
new LVPDGate2;

Now, under your 'OnGameModeInit' add the following:
pawn Код:
CreateObject(995,1544.841674,-1633.573242,13.244799,90.000000,0.000000,271.012207); // LSPDBlock1
    CreateObject(994,1544.860107,-1617.647216,12.537019,-1.000000,0.000000,269.168762); // LSPDBlock2
    CreateObject(971,-1636.529296,688.580444,9.389122,0.000000,0.000000,358.653167); // SFPDBlock1
    LSPDBarrier1 = CreateObject(968,1544.755004,-1623.929199,13.352820,0.000000,89.000000,269.818847);
    LSPDGate1 = CreateObject(980,1588.265991,-1638.143554,15.014236,0.000000,0.000000,0.675605);
    SFPDBarrier1 = CreateObject(968,-1572.275878,665.800231,7.037499,0.000000,-89.000000,91.176780);
    SFPDBarrier2 = CreateObject(968,-1701.454101,680.673767,24.857488,0.000000,-89.000000,269.939086);
    SFPDGate1 = CreateObject(971,-1627.696777,688.464660,9.414549,0.000000,0.000000,-0.333460);
    LVPDBarrier1 = CreateObject(968,2238.143554,2457.357910,10.833136,0.000000,89.000000,271.965820);
    LVPDGate1 = CreateObject(980,2293.974853,2497.135498,4.561177,0.000000,0.000000,91.243118);
    LVPDGate2 = CreateObject(980,2335.075195,2443.761474,7.144308,0.000000,0.000000,241.384170);

Now all we need are the commands. Under your 'OnPlayerCommandText' add the following:
pawn Код:
if(strcmp(cmd, "/LSPDBarrier1open", true) == 0) // Command
    {
      if(IsACop(playerid)) // Checks if the player is in the police
      {
        SetObjectRot(LSPDBarrier1,0.000000,0.000000,269.818847); // Moves the object
      }
    }
    if(strcmp(cmd, "/LSPDBarrier1close", true) == 0)
    {
      if(IsACop(playerid))
      {
        SetObjectRot(LSPDBarrier1,0.000000,89.000000,269.818847);
    }
    }
    if(strcmp(cmd, "/LSPDGate1open", true) == 0)
    {
      if(IsACop(playerid))
      {
        MoveObject(LSPDGate1, 1588.265991,-1638.143554,9.534472,0.4);
      }
    }
    if(strcmp(cmd, "/LSPDGate1close", true) == 0)
    {
      if(IsACop(playerid))
      {
        MoveObject(LSPDGate1, 1588.265991,-1638.143554,15.014236,0.4);
      }
    }
    if(strcmp(cmd, "/SFPDBarrier1open", true) == 0)
    {
      if(IsACop(playerid))
      {
        SetObjectRot(SFPDBarrier1,0.000000,-1.000000,91.176780);
      }
    }
    if(strcmp(cmd, "/SFPDBarrier1close", true) == 0)
    {
      if(IsACop(playerid))
      {
        SetObjectRot(SFPDBarrier1,0.000000,-89.000000,91.176780);
      }
    }
    if(strcmp(cmd, "/SFPDBarrier2open", true) == 0)
    {
      if(IsACop(playerid))
      {
        SetObjectRot(SFPDBarrier2,0.000000,-1.000000,269.939086);
      }
    }
    if(strcmp(cmd, "/SFPDBarrier2close", true) == 0)
    {
      if(IsACop(playerid))
      {
        SetObjectRot(SFPDBarrier2,0.000000,-89.000000,269.939086);
      }
    }
    if(strcmp(cmd, "/SFPDGate1open", true) == 0)
    {
      if(IsACop(playerid))
      {
        MoveObject(SFPDGate1, -1627.696777,688.464660,14.599885,0.4);
      }
    }
    if(strcmp(cmd, "/SFPDGate1close", true) == 0)
    {
      if(IsACop(playerid))
      {
        MoveObject(SFPDGate1, -1627.696777,688.464660,9.414549,0.4);
      }
    }
    if(strcmp(cmd, "/LVPDBarrier1open", true) == 0)
    {
      if(IsACop(playerid))
      {
        SetObjectRot(LVPDBarrier1, 0.000000,-1.000000,271.965820);
      }
    }
    if(strcmp(cmd, "/LVPDBarrier1close", true) == 0)
    {
      if(IsACop(playerid))
      {
        SetObjectRot(LVPDBarrier1, 0.000000,89.000000,271.965820);
      }
    }
    if(strcmp(cmd, "/LVPDGate1open", true) == 0)
    {
      if(IsACop(playerid))
      {
        MoveObject(LVPDGate1, 2293.974853,2497.135498,10.055157,0.4);
      }
    }
    if(strcmp(cmd, "/LVPDGate1close", true) == 0)
    {
      if(IsACop(playerid))
      {
        MoveObject(LVPDGate1, 2293.974853,2497.135498,4.561177,0.4);
      }
    }
    if(strcmp(cmd, "/LVPDGate2open", true) == 0)
    {
      if(IsACop(playerid))
      {
        MoveObject(LVPDGate2, 2335.075439,2443.761474,12.621609,0.4);
      }
    }
    if(strcmp(cmd, "/LVPDGate2close", true) == 0)
    {
      if(IsACop(playerid))
      {
        MoveObject(LVPDGate2, 2335.075195,2443.761474,7.144308,0.4);
      }
    }
If you still can't do it then add my msn: removed
Reply


Messages In This Thread
[Add-On] Police Gates (GF) - by Tez2k7 - 31.08.2008, 23:30
Re: [Add-On] Police Gates (GF) - by northarmy - 01.09.2008, 00:02
Re: [Add-On] Police Gates (GF) - by brett7 - 01.09.2008, 00:42
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 01.09.2008, 01:22
Re: [Add-On] Police Gates (GF) - by northarmy - 01.09.2008, 02:33
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 01.09.2008, 09:21
Re: [Add-On] Police Gates (GF) - by splitx - 01.09.2008, 12:15
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 01.09.2008, 12:57
Re: [Add-On] Police Gates (GF) - by northarmy - 01.09.2008, 13:57
Re: [Add-On] Police Gates (GF) - by Landon - 01.09.2008, 15:08
Re: [Add-On] Police Gates (GF) - by tomnidi - 01.09.2008, 18:58
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 01.09.2008, 20:05
Re: [Add-On] Police Gates (GF) - by kevinwalter - 10.09.2008, 12:00
Re: [Add-On] Police Gates (GF) - by veteranmoza - 26.09.2008, 14:08
Re: [Add-On] Police Gates (GF) - by Royals - 26.09.2008, 14:33
Re: [Add-On] Police Gates (GF) - by veteranmoza - 26.09.2008, 15:42
Re: [Add-On] Police Gates (GF) - by Royals - 26.09.2008, 22:24
Re: [Add-On] Police Gates (GF) - by Thearenor - 08.10.2008, 13:58
Re: [Add-On] Police Gates (GF) - by howardthk - 09.10.2008, 13:32
Re: [Add-On] Police Gates (GF) - by MenaceX^ - 09.10.2008, 15:03
Re: [Add-On] Police Gates (GF) - by SAW-RL - 11.10.2008, 08:10
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 11.10.2008, 16:47
Re: [Add-On] Police Gates (GF) - by FrankQ - 11.10.2008, 21:22
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 11.10.2008, 23:16
Re: [Add-On] Police Gates (GF) - by erne456 - 16.10.2008, 15:59
Re: [Add-On] Police Gates (GF) - by MenaceX^ - 19.10.2008, 22:38
Re: [Add-On] Police Gates (GF) - by |CrippinBloodDrippin| - 20.10.2008, 00:44
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 25.10.2008, 16:16
Re: [Add-On] Police Gates (GF) - by MenaceX^ - 25.10.2008, 17:15
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 26.10.2008, 20:51
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 07.01.2009, 18:50
Re: [Add-On] Police Gates (GF) - by pidar - 07.01.2009, 19:26
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 07.01.2009, 20:08
Re: [Add-On] Police Gates (GF) - by MenaceX^ - 20.01.2009, 10:46
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 20.01.2009, 15:56
Re: [Add-On] Police Gates (GF) - by Chpp - 02.02.2009, 14:43
Re: [Add-On] Police Gates (GF) - by znake - 05.02.2009, 13:19
Re: [Add-On] Police Gates (GF) - by eXchainZ-FoReVeR - 07.02.2009, 07:38
Re: [Add-On] Police Gates (GF) - by Omega90210 - 08.02.2009, 19:58
Re: [Add-On] Police Gates (GF) - by TrueCoppa - 08.02.2009, 20:01
Re: [Add-On] Police Gates (GF) - by znake - 08.02.2009, 21:52
Re: [Add-On] Police Gates (GF) - by Omega90210 - 10.02.2009, 04:09
Re: [Add-On] Police Gates (GF) - by Omega90210 - 10.02.2009, 04:19
Re: [Add-On] Police Gates (GF) - by Klutty - 10.02.2009, 11:06
Re: [Add-On] Police Gates (GF) - by SuperS0nic - 10.02.2009, 13:38
Re: [Add-On] Police Gates (GF) - by znake - 10.02.2009, 13:42
Re: [Add-On] Police Gates (GF) - by GaTor360 - 08.04.2009, 18:34
Re: [Add-On] Police Gates (GF) - by ccconfy - 09.04.2009, 11:11
Re: [Add-On] Police Gates (GF) - by 4Brothers - 11.04.2009, 19:24
Re: [Add-On] Police Gates (GF) - by Cesar - 12.04.2009, 14:56
Re: [Add-On] Police Gates (GF) - by Lewwy - 12.04.2009, 15:02
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 17.04.2009, 03:03
Re: [Add-On] Police Gates (GF) - by GregJ - 29.04.2009, 06:54
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 12.05.2009, 21:34
Re: [Add-On] Police Gates (GF) - by [BT]Sweet - 13.05.2009, 07:22
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 16.05.2009, 20:57
Re: [Add-On] Police Gates (GF) - by Kanji_Suzuki - 19.05.2009, 13:23
Re: [Add-On] Police Gates (GF) - by Tez2k7 - 07.06.2009, 11:43

Forum Jump:


Users browsing this thread: 1 Guest(s)