14.07.2010, 23:06
Код:
#define PRESSED(%0) \ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) new gate; public OnFilterScriptInit() // change just here duh' { gate = CreateObject(objectid, objectx, objecty, objectz, xrotation, yrotation, zrotation); return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (PRESSED(KEY_FIRE)) { if(IsPlayerInRangeOfPoint(playerid, range, objectx,objecty,objectz)) { MoveObject(gate, newx, newy, newz, speed); } } return 1; }