[FilterScript] Map Voting System [Dialog,Editable Maps]
#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


Messages In This Thread

Forum Jump:


Users browsing this thread: