03.07.2011, 20:12
i use this code
but it always gives me 1st map ;s
pawn Код:
switch(rofl)
{
case 0: { map[0] = b; rofl++; printf("%s",nextdmmapname[b]); }
case 1: { map[1] = b; rofl++; printf("%s",nextdmmapname[b]); }
case 2: { map[2] = b; rofl++; printf("%s",nextdmmapname[b]); }
case 3: { map[3] = b; rofl++; printf("%s",nextdmmapname[b]); }
case 4: { map[4] = b; rofl++; printf("%s",nextdmmapname[b]); }
case 5: { map[5] = b; rofl++; printf("%s",nextdmmapname[b]); }
case 6: { map[6] = b; rofl++; printf("%s",nextdmmapname[b]); }
case 7: { map[7] = b; rofl++; printf("%s",nextdmmapname[b]); }
}
// i save variables in upper code
//count vote on dialog response
switch(listitem)
{
case 0: map[0] ++;
case 1: map[1] ++;
case 2: map[2] ++;
case 3: map[3] ++;
case 4: map[4] ++;
case 5: map[5] ++;
case 6: map[6] ++;
}
//then get most votes in down code
new mapcount = 0;
for (new i = 0; i < sizeof(map);i++)
{
if(map[i] > mapcount)
{
NextdmmapByVote = i;
break;
}
}