26.07.2010, 22:46
here's my code
anyways, when the object is moved they all create the same size explosions, which means only the first "if" is called, no matter which object moved. How do I fix this?
Код:
public OnObjectMoved(objectid) { if(objectid == Shell_1){ new Float:tempx; new Float:tempy; new Float:tempz; GetObjectPos(Shell_1,tempx,tempy,tempz); CreateExplosion(tempx, tempy, tempz, 7, 10); DestroyObject(Shell_1); return 1;} else if(objectid == Shell_2){ new Float:tempx; new Float:tempy; new Float:tempz; GetObjectPos(Shell_2,tempx,tempy,tempz); CreateExplosion(tempx, tempy, tempz, 12, 10); DestroyObject(Shell_2); return 1;} else if(objectid == Shell_3){ new Float:tempx; new Float:tempy; new Float:tempz; GetObjectPos(Shell_3,tempx,tempy,tempz); CreateExplosion(tempx, tempy, tempz, 11, 10); DestroyObject(Shell_3); return 1;} else if(objectid == Shell_4){ new Float:tempx; new Float:tempy; new Float:tempz; GetObjectPos(Shell_4,tempx,tempy,tempz); CreateExplosion(tempx, tempy, tempz, 10, 10); DestroyObject(Shell_4); return 1;} return 1; }