pawn Code:
/*==============================================================================
* MADE BY JONNYBOY =
*THIS SCRIPT IS FOR THOSE THAT NEED HELP WITH AUTO GATES! DON'T REMOVE CREDITS!=
*=============================================================================*/
/*
TIP: YOU NEED TO CHANGE SOME STUFF! like where it should go! "0,0,0"
*/
#define FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA
#include <a_samp>
new portarogate1;
new barrackgate;
#if defined FILTERSCRIPT
forward close();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" AutoGates");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" ITS A FILTERSCRIPT");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
barrackgate = CreateObject(976,-225.27685546875,2614.13671875,61.708999633789,0,0,0, 500);
portarogate1 = CreateObject(976,997.58355712891,1687.7630615234,5.921875,0,0, 270);
return 1;
}
public close()
{
MoveObject(barrackgate,-225.27685546875,2614.13671875,61.708999633789, 3.00);
MoveObject(portarogate1,997.58355712891,1687.7630615234,5.921875, 3.00);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/PG1", cmdtext, true, 10) == 0)
{
MoveObject(portarogate1,0,0,0, 2.00);
SetTimer("close", 7000, 0);//Changeme
SendClientMessage(playerid,COLOR_YELLOW,"Changeme");
return 1;
}
if (strcmp("/BG", cmdtext, true, 10) == 0)
{
MoveObject(barrackgate,0,0,0, 2.00);
SetTimer("close", 7000, 0);//Changeme
SendClientMessage(playerid,COLOR_YELLOW,"Changeme");
return 1;
}
return 0;
}
change stuff that you want it.