07.07.2011, 08:13
pawn Код:
stock createVote()
{
for (new i;i<4;i++) gVoteItems[i] = "RESET";
new dstr[256], bool:check = false;
// for (new i;i<4;i++) gVoteItems[i] = "RESET";
for (new i = 0; i < MAX_RACING_MAPS; i++)
{
if(!check)
{
randomRaceName(i,gRaces);
format(dstr, sizeof(dstr), "%s", gVoteItems[i]);
check = true;
}
else format(dstr, sizeof(dstr), "%s\r\n%s", dstr, gVoteItems[i]);
}
for (new i=0;i<4;i++)gVotes[i]=0;
for(new i=0;i<MAX_PLAYERS;i++)
{
ShowPlayerDialog(i, VOTEMAP_DIALOGID, DIALOG_STYLE_LIST, "Racing Vote", dstr, "Vote", "Cancel");
}
}