Jump to content
  • 0

[AJUTOR]Gate


andybtv

Question

Am o problema cu un FS cu o poarta de la LSPD

Acesta este FS-ul:


#include <a_samp>

forward GateClose(playerid);


new Pd;


#if defined FILTERscript
#define COLOR_GRAD1 0xB4B5B7FF

public OnFilterscriptInit()
{

	return 1;
}

public OnFilterscriptExit()
{
	return 1;
}

#else

main()
{

}

#endif



public OnGameModeInit()
{
   	Pd = CreateObject(971, 1588.636963, -1637.876099, 14.681921, 0.0000, 0.0000, 0.0000); //Pd Gate Closed



}



public OnPlayerCommandText(playerid, cmdtext[])
{


    if(!strcmp(cmdtext, "/openpdgate", true))
    {
      MoveObject(Pd,1588.498291, -1637.914307, 8.021242, 359.1406);
      SetTimer("GateClose", 10000, 0);
      SendClientMessage(playerid, 0x00D9D9FF,"AA.");
      return 1;
	}

	return 0;
}


public GateClose(playerid)
{
    CreateObject(971, 1588.636963, -1637.876099, 14.681921, 0.0000, 0.0000, 0.0000); //Pd gate closed

}


Problema este ca dupa ce scriu odata /openpdgate , poarta se deschide dar a II-a oara numai vrea.Am mai asteptat 5 min, tot nu vrea.

Multumesc.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


#include <a_samp>

forward GateClose(playerid);


new Pd;


#if defined FILTERscript
#define COLOR_GRAD1 0xB4B5B7FF

public OnFilterscriptInit()
{

	return 1;
}

public OnFilterscriptExit()
{
	return 1;
}

#else

main()
{

}

#endif



public OnGameModeInit()
{
   	Pd = CreateObject(971, 1588.636963, -1637.876099, 14.681921, 0.0000, 0.0000, 0.0000); //Pd Gate Closed



}



public OnPlayerCommandText(playerid, cmdtext[])
{


    if(!strcmp(cmdtext, "/openpdgate", true))
    {
      MoveObject(Pd,1588.498291, -1637.914307, 8.021242, 359.1406);
      SetTimer("GateClose", 10000, 0);
      SendClientMessage(playerid, 0x00D9D9FF,"AA.");
      return 1;
	}

	return 0;
}


public GateClose(playerid)
{
    MoveObject(Pd, 1588.636963, -1637.876099, 14.681921, 3); //Pd gate closed

}


Ti-am reparat codul, tu la GateClose in loc sa muti obiectul, il recreai.

ir2tc1.png [url=http://forum.sa-mp.ro/filter-scripts-and-gamemode
Link to comment
Share on other sites

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.