26.05.2015, 20:35
Hi, I was recently scripting a map voting system for my gamemode, I have a timer which starts every five minutes, if the round is started, it ends the round with the reason time over, if the round is not started, it starts a round.
Alright, this is how the map voting should go, I show them a dialog where they should press on a map name, and right after they press, there should be something which sets the map to the highest map with votes.
Some of my code:
Alright, this is how the map voting should go, I show them a dialog where they should press on a map name, and right after they press, there should be something which sets the map to the highest map with votes.
Some of my code:
pawn Код:
public RoundStatus(playerid)
{
if(roundStarted == 1)
{
foreach(Player, i)
{
SendClientMessageToAll( -1, "The round has been ended, reason: TIME UP!");
SetPlayerColor(i, COLOR_HUMAN);
SetSpawnInfo(i, TEAM_HUMANS, 26, -2260.7219, 686.1232 , 49.2969, 0, 10, 1, 23, 200, 25, 200);
SpawnPlayer(i);
}
}
if(roundStarted != 1)
{
foreach(Player, i)
{
ShowPlayerDialog(i, DIALOG_VOTE, DIALOG_STYLE_LIST, "Map Vote", "zmp_zombified \n zmp_cb \n zmp_dillimore \n zmp_funland \n zmp_grove \n zmp_lsbeach \n zmp_lshood \n zmp_mjcastillo \n zmp_outpost \n zmp_piertrip \n zmp_stormdrain \n zmp_swamp \n zmp_theships \n zmp_town \n zmp_unity \n zmp_workfare \n zmp_zombierave \n", "Vote", "Cancel" );
}
}
return 1;
}