25.11.2012, 13:01
Well, i can script for you. First of all create a variable top of your script.
Then create an object below OnGameModeInit(). Here's an example.
0.0 is the coordinat from x, y, z, rX, rY, rZ Position. You can change it.
CreateObject()
Then go to OnPlayerCommandText(), we'll create a command.
We created /open command, it opens the gate. 1.0 is the new x, y, z position. Like i said you can change it. 3.0 = Speed. 3 Seconds.
Here's /close command
0.0 is the old x, y, z Position, you know.
pawn Код:
new myGate; // Top of the script
pawn Код:
myGate = CreateObject(974, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
CreateObject()
Then go to OnPlayerCommandText(), we'll create a command.
pawn Код:
if (strcmp("/open", cmdtext, true, 10) == 0)
{
MoveObject(myGate, 1.0, 1.0, 1.0, 3.0);
return 1;
}
Here's /close command
pawn Код:
if (strcmp("/close", cmdtext, true, 10) == 0)
{
MoveObject(myGate, 0.0, 0.0, 0.0, 3.0);
return 1;
}