22.04.2011, 15:56
ok just look at this, it doesnt destroy the object.
Note* that is the entire code, currentid is not changed.
"id" is vehicleid
somehow moveobject moves it? but the timer doesnt destroy it
pawn Код:
forward Destroy_Object(objectid);//top
Vehicle_Machine_Gun[id][Vehicle_Machine_Gun_Currentid[id]] = CreateObject(Machine_Gun, x, y, z, 0, 0, a, 300.0);
if(Vehicle_Machine_Gun_CurrentSlot[id] == 1) a += 90;
else if(Vehicle_Machine_Gun_CurrentSlot[id] == 0) a += 270;
x += (175 * floatsin(-a, degrees));
y += (175 * floatcos(-a, degrees));
MoveObject(Vehicle_Machine_Gun[id][Vehicle_Machine_Gun_Currentid[id]], x, y, z, 55);
SetTimerEx("Destroy_Object", 2000, false, "i", Vehicle_Machine_Gun[id][Vehicle_Machine_Gun_Currentid[id]]);
public Destroy_Object(objectid) return DestroyObject(objectid);
"id" is vehicleid
somehow moveobject moves it? but the timer doesnt destroy it