01.08.2012, 14:57
So, if I was to add a check to see if the chosen number has already been used, i'd do something like this?
pawn Код:
for(new i = 0; i < sizeof(UsedObjsID); i++) {
if(ChosenObj == UsedObjsID[i]) {
ChosenObj = randomex(0, TotalObjs);
format(string, sizeof string, "INFO: {FFFFFF}ObjectID: %d has already been used! Looking for another object", ChosenObj-1);
SendClientMessageToAll(COLOR_ASKQ, string);
format(string, sizeof string, "TEST: {FFFFFF}ObjectID: %d", UsedObjsID[i]);
SendClientMessageToAll(COLOR_ASKQ, string);
return 1;
}
}