Calculating the statistical Mode(s) of a (possibly multi-modal) set of elements
So without really understanding what you mean with mode I would suggest the following purely based on your code:


Add includes. The code as is doesn't compile, which makes it harder for reviewers.
Premature Optimization. You are doing a lot of it. There is no reason to assign vectorsize to myvector.size(). The compiler will take care of that. Also currentnum is unnecessary.
Be consistent with your style. Putting else clauses at the same line with the code makes the code incredibly hard to read. Also parentheses really help in tracing the control flow. Generally nested control flow should utilize parentheses. 
Naming. Consider camelCase or scores, but do not just add lowercaseletters as in alreadyin
alreadyin == false should be !alreadyin


So know that I know what you mean we can optimize the code.

The first thing would be naming. The vector containing the modes should be named modes rather than maxs. Similarly I would rather name max as currentMode or better modeStrength.

The second point would be the update of the vector. Currently you always clear it. However, if it only has one mode you can just change that value.

if (modes.size() == 1) 
    modes[0] = myVector[i];
else if (modes.size() &gt; 1)  {
    modes.clear();
    modes.push_back(myVector[i]);
} else {
    modes.push_back(myVector[i]);
}


The third idea would be to increment your loop based on the found matches so you do not reiterate already processed data

unsigned counter;
unsigned modeStrength = 0;
for (unsigned i=0; i &lt; myVector.size() - 1; i += counter) {
    counter = 1;
    while ((counter + i != myVector.size()) &amp;&amp; 
           (myVector[i] == myVector[i+counter])) {
        counter++;
    }
    if (counter == modeStrength) {
        modes.push_back(myVector[i]);
    } else if (counter &gt; modeStrength) {
        modeStrength = counter;
        if (modes.size() == 1) {
            modes[0] = myVector[i];
        } else {
            modes.clear();
            modes.push_back(myVector[i]);
        }
    }
}


That would also turn the check for existence unnecessary.