Jump to content
  • 0

problema bariera/poarta1/poarta2 LOS SANTOS PD


Question

Posted

Deci am o problema,am file scriptu asta pentru bariera pd,si poarta garaj si toata lumea poate folosi comada /poarta  , /poarta1 , /poarta2

Eu as vrea ca doar PD sa aibe acces la astea si nu stiu cum sa fac.

Daca m-ati lamuri v-as ramane dator

Stima si respect!

Atasez filter scriptul :

_____________________________________________________

#include <a_samp>

#pragma tabsize 0

#define BLUE 0x0D7792AA

new gate;

new gate1;

new gate2;

forward GateClose(playerid);

forward GateClose1(playerid);

forward GateClose2(playerid);

// This is a comment

// uncomment the line below if you want to write a filterscript

#define Filterscript

#if defined FILTERSCRIPT

public OnFilterScriptInit()

{

print("\n--------------------------------------");

print(" Mitza");

print("--------------------------------------\n");

return 1;

}

public OnFilterScriptExit()

{

return 1;

}

#else

main()

{

print("\n----------------------------------");

print(" Mitza");

print("----------------------------------\n");

}

#endif

public OnGameModeInit()

{

    gate = CreateObject(968, 1544.745605, -1630.961792, 13.177118, 0.0000, 269.7592, 270.0000);

    CreateObject(994, 1544.744751, -1617.584961, 12.394474, 0.0000, 0.0000, 270.0000);

    CreateObject(994, 1543.487793, -1632.711548, 12.554396, 0.0000, 0.0000, 270.0000);

    gate1 = CreateObject(16773, 1591.846802, -1638.013550, 13.491905, 0.0000, 0.0000, 0.0000);

    CreateObject(1566, 1582.545532, -1637.891357, 13.580875, 0.0000, 0.0000, 0.0000);

    CreateObject(987, 1551.911865, -1617.354736, 12.371878, 0.0000, 0.0000, 0.0000);

    CreateObject(987, 1539.952759, -1617.320435, 12.382813, 0.0000, 0.0000, 0.0000);

    CreateObject(987, 1540.101807, -1605.454956, 12.382813, 0.0000, 0.0000, 270.0000);

    CreateObject(987, 1551.969971, -1605.532593, 12.382813, 0.0000, 0.0000, 180.0000);

    CreateObject(987, 1563.874146, -1605.544678, 12.382813, 0.0000, 0.0000, 180.0000);

    gate2 = CreateObject(987, 1563.736816, -1617.390381, 12.382813, 0.0000, 0.0000, 90.0000);

  return 1;

}

public OnGameModeExit()

{

    return 1;

}

public GateClose(playerid)

{

      DestroyObject(gate);

      gate = CreateObject(968, 1544.745605, -1630.961792, 13.177118, 0.0000, 269.7592, 270.0000);

      return 1;

}

public GateClose1(playerid)

{

      MoveObject(gate1, 1591.846802, -1638.013550, 13.491905, 0.8);

      return 1;

}

public GateClose2(playerid)

{

      MoveObject(gate2, 1563.736816, -1617.390381, 12.382813, 0.8);

      return 1;

}

public OnPlayerCommandText(playerid, cmdtext[])

{

    if (strcmp(cmdtext, "/poarta", true)==0)

    {

DestroyObject(gate);

gate = CreateObject(968, 1544.746704, -1630.777222, 13.160947, 0.0000, 359.1406, 270.0000);

SendClientMessage(playerid, BLUE, "Bariera se va inchide in 10 secunde !");

SetTimer("GateClose", 10000, 0);

    return 1;

    }

    if (strcmp(cmdtext, "/poarta2", true)==0)

    {

MoveObject(gate1, 1591.738037, -1638.271606, -2.911936, 0.8);

SendClientMessage(playerid, BLUE, "Poarta se va inchide in 10 secunde !");

SetTimer("GateClose1", 10000, 0);

    return 1;

    }

    if (strcmp(cmdtext, "/poarta1", true)==0)

    {

MoveObject(gate2, 1563.911255, -1617.380615, 4.307865, 0.8);

SendClientMessage(playerid, BLUE, "Boxa se va inchide in 15 de secunde !");

SetTimer("GateClose2", 15000, 0);

    return 1;

    }

return 0;

}

3 answers to this question

Recommended Posts

Posted

Incluzi FS-ul in GM si adaugi verificarea urmatoare la inceputul comenzilor:

if ( PlayerInfo [ playerid ] [ pMember ] != 1 && PlayerInfo [ playerid ] [ pLeader ] != 1 ) return SendClientMessage ( playerid, -1, "Nu sunteti membru PD ." );

Y!M: [email protected] ( nu este ID pt. help-center )

Posted

Mersi de raspuns,o alta intrebare,cum deschid un fisier ini cu Modulul YSI , vreau sa deschid fisierul si sa folosesc informatiile acelea

Guest
This topic is now closed to further replies.
×
×
  • 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.