02.10.2010, 17:15
Quote:
It's very radical in my mind, why isn't this working like it supposed to ?
|
pawn Код:
forward votedmode(playerid);
public votedmode(playerid)
{
new mapWinner, mostVotes = -1;
for(new i; i < sizeof maps; i++) {
if(maps[i] > mostVotes) {
mapWinner = i;
mostVotes = maps[i];
}
}
switch (mapWinner) {
case 0: {
SendRconCommand("changemode wwx");
}
case 1: {
SendRconCommand("changemode jailbreak");
}
case 2: {
SendRconCommand("changemode mallmilitia");
}
case 3: {
SendRconCommand("changemode holywarfare");
}
case 4: {
SendRconCommand("changemode cstyles");
}
case 5: {
SendRconCommand("changemode killemall");
}
case 6: {
SendRconCommand("changemode factory");
}
case 7: {
SendRconCommand("changemode elitefighter");
}
case 8: {
SendRconCommand("changemode lssubway");
}
case 9: {
SendRconCommand("changemode dspeeders");
}
case 10: {
SendRconCommand("changemode mafiawar");
}
case 11: {
SendRconCommand("changemode pirateisland");
}
case 12: {
SendRconCommand("changemode boattheft");
}
}
print("Voted Mode Was Successfully Executed.");
return 1;
}