[FilterScript] Map Voting System [Dialog,Editable Maps]
#1


This does not save the map, tho it might still be very useful.
I cannot know when a person wants the vote to start thou i have not implemented a auto detector or similar.
Simple Version:
Add this to where you want the voting to start:
Код:
CallRemoteFunction("BeginVote","");
Next to add a new map/remove/edit one, you'l needa open votemap.pwn and edit the two Variables MapNames and Map dont be confused. The map var is actually the names and MapNames the Locations. They are linked like this:
First entry in MapNames with First Entry in Map. Warrning: Map and MapNames have to have the Same amount of Entries or this will not work.
I suggest you removing All the default ones and doing this like this:
pawn Код:
new MapNames[][4] =
{
    {1,33,7}
};

new Map[][] =
{
    "Leet"
};
Will create only one map, Leet with co-ordinates X 1 Y 33 Z 7

Apologies if there are some more Prints left for testing, feel free to tell me them, and i will remove them.
DOWNLOAD
Download Link 1


INSTALLATION
Simple, just Place both files into filterscripts and edit the server.cfg.
Reply
#2

You can make the function stock, so it will be something like this

pawn Код:
stock BeginVote()
{
    SendClientMessageToAll(COLOR_RED,"Voting Ends in 15 seconds. Cast your Votes");
    SetTimer("endvote",15000,0);
    ActiveVote = true;
    new info[150];
    for (new i = 0;i<sizeof(MapNames);i++)
    {
        if (i == 0) format(info,sizeof(info),"%s\n",Map[i]);
        if (i == sizeof(MapNames)-1) format(info,sizeof(info),"%s%s",info,Map[i]);
        if (i != sizeof(MapNames) && i != 0) format(info,sizeof(info),"%s\n",info,Map[i]);
    }
    for (new i = 0;i<MAX_PLAYERS; i++)
    {
        CanVote[i] = 1;
        ShowPlayerDialog(i,500,DIALOG_STYLE_LIST,"Vote for Map",info,"Vote","Vote");
    }
    return 1;
}

//and call it when you need instead of using the CallRemoteFunction("BeginVote","");

BegineVote();
Reply
#3

Didnt Script for a long time. Stocks can be Called, even tho this isn't a include without CallRemoteFunction?
Reply
#4

Oh, ye this isn't an include. Sorry, good job.
Reply
#5

Seems i cannot understand you, This is not an include, it's a filterscript.
Reply
#6

Yep that was my fail, i though it was an include.
Reply
#7

Yes. Just add the include in server.cfg, It will load the include, and In the gamemode just add:
Код:
CallRemoteFunction("BeginVote","")
What will start a vote if the filterscript is loaded.
Reply
#8

It's okay, lol i'm a frailer on seeing the [FilterScript] thing.
Reply
#9

You seem to not get my Point actually. You dont NEED TO Include it.
Just go in server.cfg and edit filterscripts so it will look like this:
Код:
filterscripts votemap
Was that so hard? You don't need to include it anywhere! Then without any Problems just add that line of code witch will start the vote.

Can anyone else explain it to him? I cant seem to do that.
EDIT:
sigh...He probably didn't even read this. Any other Problems?
Reply
#10

Wtfk ? Counter-Strike ?

Nice.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)