Door Script
#5

Well, i can script for you. First of all create a variable top of your script.
pawn Код:
new myGate; // Top of the script
Then create an object below OnGameModeInit(). Here's an example.
pawn Код:
myGate = CreateObject(974, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
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.
pawn Код:
if (strcmp("/open", cmdtext, true, 10) == 0)
{
    MoveObject(myGate, 1.0, 1.0, 1.0, 3.0);
    return 1;
}
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
pawn Код:
if (strcmp("/close", cmdtext, true, 10) == 0)
{
    MoveObject(myGate, 0.0, 0.0, 0.0, 3.0);
    return 1;
}
0.0 is the old x, y, z Position, you know.
Reply


Messages In This Thread
Door Script - by AarabMoney - 25.11.2012, 12:53
Re: Door Script - by MrMaarud - 25.11.2012, 12:56
Re: Door Script - by AarabMoney - 25.11.2012, 12:58
Re: Door Script - by MrMaarud - 25.11.2012, 12:58
AW: Door Script - by Skimmer - 25.11.2012, 13:01

Forum Jump:


Users browsing this thread: 1 Guest(s)