11.11.2017, 01:43
Change your CloseGate function to this:
PHP код:
forward CloseGate(gateid, linkid, Float:fX, Float:fY, Float:fZ, Float:speed, Float:fRotX, Float:fRotY, Float:fRotZ);
public CloseGate(gateid, linkid, Float:fX, Float:fY, Float:fZ, Float:speed, Float:fRotX, Float:fRotY, Float:fRotZ)
{
new id = -1;
if (GateData[gateid][gateExists] && GateData[gateid][gateOpened])
{
MoveDynamicObject(GateData[gateid][gateObject], fX, fY, fZ, speed, fRotX, fRotY, fRotZ);
if ((id = GetGateByID(linkid)) != -1)
{
MoveDynamicObject(GateData[id][gateObject], GateData[id][gatePos][0], GateData[id][gatePos][1], GateData[id][gatePos][2], speed, GateData[id][gatePos][3], GateData[id][gatePos][4], GateData[id][gatePos][5]);
GateData[id][gateOpened] = 0;
return 1;
}
}
return 0;
}