18.12.2010, 21:10
pawn Код:
/*==============================================================================
* MADE BY JONNYBOY =
* http://rpswen.freeforums.org/ =
*=============================================================================*/
#define FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA
#include <a_samp>
new O1;
new O2;
#if defined FILTERSCRIPT
forward close();
public OnFilterScriptInit()
{
print(" Gates");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print(" ");
}
#endif
public OnGameModeInit()
{
O1 = CreateObject(1357,68286133,773.33685303,4,0.00000000,0.00000000,0.00000000);
O2 = CreateObject(1357,40942383,713.22784424,4,0.00000000,90.00000000,90.00000000);
return 1;
}
public close()
{
MoveObject(O1,68286133,773.33685303,4, 3.00);
MoveObject(O2,1357,40942383,713.22784424,4, 3.00);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/open1", cmdtext, true, 10) == 0)
{
MoveObject(O1,68286133,773.33685303,12.44526672, 2.00);
SetTimer("close", 7000, 0);//gate will be closed for 7 seconds
SendClientMessage(playerid,COLOR_YELLOW,"enter text here");
return 1;
}
if (strcmp("/open2", cmdtext, true, 10) == 0)
{
MoveObject(O2,40942383,713.22784424,12.44526672, 2.00);
SetTimer("close", 7000, 0);//gate will be closed for 7 seconds
SendClientMessage(playerid,COLOR_YELLOW,"enter text here");
return 1;
}
return 0;
}