24.08.2012, 17:31
Try this.
Код:
new bool:SirenCreated; new obj1; new obj2; public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid, 0.1, 1207.0170, -1333.9816, 13.3984) && SirenCreated == false) { SirenCreated = true; obj1 = CreateObject(18646, 1207.5631, -1334.1051, 13.5816, 0.0, 0.0, 0.0); obj2 = CreateObject(18646, 1206.5031, -1334.1051, 13.5816, 0.0, 0.0, 0.0); } if(!IsPlayerInRangeOfPoint(playerid, 0.1, 1207.0170, -1333.9816, 13.3984) && SirenCreated == true) { SirenCreated = false; DestroyObject(obj1); DestroyObject(obj2); } return 1; }