10.12.2016, 17:44
rBits looks good
I've never tested/used that system so I can't tell you something more!
Do you mean do something like this?
It's great
but always return 0 for me, I don't know if I'm doing it well :P
![Smiley](images/smilies/smile.png)
Quote:
The idea is good. I'd probably use something like this:
pawn Код:
|
PHP код:
stock SetCombination(&var, slot, value)
{
new comb[11];
format(comb, 11, "%010i", var);
comb[9 - slot] = (1 <= value <= 9) ? 48 + value : 48;
return -1;
}
stock GetCombination(var, slot)
{
new comb[11];
format(comb, 11, "%010i", var);
if(48 <= (slot = comb[9 - slot]) <= 57) return slot - 48;
return 0;
}
![Smiley](images/smilies/smile.png)