11.05.2010, 18:22
First, you msut create 2 types of coordinates, 1 when the gate is closed, 2 when the gate is open.
On /open command you add the coords of the open gate
on /close you add the coords of the closed gate
this under OnPlayerCommandText
Hope this helped.
On /open command you add the coords of the open gate
on /close you add the coords of the closed gate
pawn Код:
new GATE;
pawn Код:
OnGameModeInit()
{
GATE = CreateObject(...)//Create the object, coords must be of the closed gate.
return 1;
}
pawn Код:
if(strcmp(cmdtext, "/OPEN", true) == 0)
{
MoveObject(GATE, coords)//The coords of the open gate
return 1;
}
if(strcmp(cmdtext, "/close", true) == 0)
{
MoveObject(GATE, coords)//The coords of the closed gate
return 1;
}

