20.03.2011, 02:29
Why you made like 4 gates ?
You only need 1 gate and move it around. Let me give you an example:
Next:
Now, if you, let`s say, have 2 gates, which you want to open with the same command, at the same time, you need to make another gate, gate2 for example and move it too along with the first gate.
You only need 1 gate and move it around. Let me give you an example:
pawn Код:
new gate1;
pawn Код:
public OnFilterScriptInit()
{
gate1 = CreateObject(980,923.155,-1225.358,18.3,0.0,0.0,90.000);
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/redopen", cmdtext, true, 10) == 0)
{
MoveObject(gate1, 923.155,-1225.358,7.3,3.0);
SendClientMessage(playerid,COLOR_LIGHTCYAN,"Red Blood'z Gate Is Open.Please Use /redclose to close gate");
return 1;
}
if (strcmp("/redclose", cmdtext, true, 10) == 0)
{
MoveObject(gate1, 923.155,-1225.358,18.3,3.0);
SendClientMessage(playerid,COLOR_LIGHTCYAN,"Red Blood'z Gate is Closed.Thanks");
return 1;
}
return 0;