23.09.2018, 12:02
Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys) { if(newkeys == KEY_FIRE && IsPlayerInRangeOfPoint(playerid,1.5,1340.401855, 1554.684082, 12.430313)) { if(state1 == 0) { MoveObject(Gate,1400.000000, 1554.684082, 12.430313,1.0,0.000000, 0.000000, 90.000000, 300.00); state1 = 1; } else { MoveObject(Gate,1340.401855, 1554.684082, 12.430313,1.0,0.000000, 0.000000, 90.000000, 300.00); state1 = 0; } } return 1; }
Код:
if(state1 == 0) { MoveObject(Gate,1400.000000, 1554.684082, 12.430313,1.0,0.000000, 0.000000, 90.000000, 300.00); state1 = 1;
Код:
MoveObject(Gate,1340.401855, 1554.684082, 12.430313,1.0,0.000000, 0.000000, 90.000000, 300.00); state1 = 0;