Posts: 1,648
Threads: 482
Joined: Jun 2010
Quote:
Originally Posted by Misiur
This line completely changes your code flow, remove it or move it.
You need an else clause. Learn to use it
pawn Код:
if(dooropen == 0) { printf("door open = %d", dooropen); MoveDynamicObject(chaindoor,321.45309, 310.08768, 998.14099,1.0,0,0,-90); printf("objectid = %d", chaindoor); printf("object moved"); dooropen = 1; printf("door open = %d", dooropen); } else { printf("door open = %d", dooropen); MoveDynamicObject(chaindoor,321.45309, 310.08768, 998.14099,1.0,0,0,360); dooropen = 0; }
https://sampwiki.blast.hk/wiki/Control_Structures#else
|
Much appreciated, however, I AM learning, that's why I asked.