Sounds like Malawi, or maybe Tanzania?
Generally they check your boarding pass as you exit the plane. If you managed to get past the gate keeper though, then it messes up the headcount for the next leg (LLW-BLZ or JRO-ZNZ for example) and will likely result in a delay for every other of your fellow passengers who flew their tickets as purchased as the flight crew attempts to figure out who is missing.
In short, don't do it.