SA-MP Forums Archive
[HELP] Vote Map System? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Vote Map System? (/showthread.php?tid=222903)



[HELP] Vote Map System? - Janek17 - 08.02.2011

Hey all!
Can somebody to tell me how do make votemap system for derby gamemode?

Please!


AW: [HELP] Vote Map System? - Nero_3D - 08.02.2011

No we can only tell you how to make a Vote map system in general

You need an player array (or you use pvars since it is rarely used)

But why do we need a player array and not an array with the vote options ?
Because without the player could double|triple|... vote

Than you set the voted value (the mapid) in the array|pvar (in a command or wherever you want)

At the end you only need to loop through the array|pvar and check which mapid got the most votes, done


Re: [HELP] Vote Map System? - Janek17 - 08.02.2011

But the vote map, gan to like this

New Map Vote
1. Your map name
2. Your map name
3. Your map name
4. Your map name
5. Your map name

And then the player choos what map he want


AW: [HELP] Vote Map System? - Nero_3D - 08.02.2011

So you made a dialog ? Than the player can only vote once if they cant call the dialog by themself

For that you only need an array with the vote options and increase the value if it gets voted


Re: [HELP] Vote Map System? - Janek17 - 08.02.2011

but how


AW: Re: [HELP] Vote Map System? - Nero_3D - 08.02.2011

Quote:
Originally Posted by Janek17
View Post
but how
what do you mean with how ?

Use ShowPlayerDialog and OnDialogResponse with an array and add +1 if someone voted the map
At the end, after a time or after x players voted end the mapvote and check which map got the highest votes