You have 2 objects under same variable.
PHP код:
#include <a_samp>
#define FILTERSCRIPT
new MaltGate[2];
public OnFilterScriptInit()
{
MaltGate[0] = CreateObject(969, 1268.33813, 172.65527, 18.40459, 0.00000, 0.00000, 65.53729);
MaltGate[1] = CreateObject(969, 1271.91394, 180.71890, 18.40559, 0.00000, 0.00000, 65.53729);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/OpenGate", true)){
{
MoveObject(MaltGate[0], 1265.96130, 165.58604, 18.40459, 0.00000, 0.00000, 65.53729);
MoveObject(MaltGate[1], 1273.89319, 186.60571, 18.40559, 0.00000, 0.00000, 65.55613);
return 1;
}
}
else if(strcmp(cmdtext, "/CloseGate", true)){
{
MoveObject(MaltGate[0], 1268.33813, 172.65527, 18.40459, 0.00000, 0.00000, 65.53729);
MoveObject(MaltGate[1], 1271.91394, 180.71890, 18.40559, 0.00000, 0.00000, 65.53729);
return 1;
}
}
return 0;
}