10.11.2018, 07:45
If an invalid index is passed to the function it could cause an out-of-bound error, which can lead to incorrect return values or even crashes. So you should check that the index passed is valid before accessing the array.
pawn Код:
forward IsPlayerGod(TargetID);
public IsPlayerGod(TargetID) {
if(0 <= TargetID < MAX_PLAYERS) {
return godmode[TargetID];
}
return -1;
}