Making it Random
#6

pawn Код:
new const Float:InteriorsB[10][] = {
{40},
{41},
{43},
{44},
{45},
{46},
{47},
{48},
{49},
{50}
};

dcmd_startint(playerid,params[])
    {
        if(!IsPlayerAdmin(playerid) && Variables[playerid][Level] < aLvl[0]){return DenyPlayer(playerid);}
        if(Current != -1)return SendClientMessage(playerid,MainColors[2],"Please wait until the current round ends before starting another one.");
        if(CurrentPlayers[T_HOME] < 1 && CurrentPlayers[T_AWAY] < 1) return SendClientMessage(playerid,MainColors[2],"Not enough players.");
        if(WatchingBase == true) return SendClientMessage(playerid, MainColors[2], "Please wait until the current round ends before starting another one.");
        if(!strlen(params)) return SendClientMessage(playerid, MainColors[1], "Usage: /startbase [baseid]");
        if(CurrentPlayers[T_HOME] < 1 || CurrentPlayers[T_AWAY] < 1)return SendClientMessage(playerid, MainColors[2], "Not enough players.");
        if(strval(params) == -1)
        {
            new randint = random(sizeof(InteriorsB));
            if(!BaseExists[InteriorsB[randint][0] ])return SendClientMessage(playerid, MainColors[2], "incorrect interior.");
            new string[128];
            format(string,sizeof(string),"*** The random %d map has now started!",InteriorsB[randint][0] );
            SendClientMessageToAll(COLOR_ROUND,string);
            PrepareRound();
            SetTimerEx("StartRound",5000,0,"ii",InteriorsB[randint][0] ,0);
            return 1;
        }
        return 1;
    }
Reply


Messages In This Thread
Making it Random - by (_AcE_) - 27.12.2011, 05:08
Re: Making it Random - by Lorenc_ - 27.12.2011, 05:11
Re: Making it Random - by (_AcE_) - 27.12.2011, 05:15
Re: Making it Random - by jamesbond007 - 27.12.2011, 05:18
Re: Making it Random - by (_AcE_) - 27.12.2011, 05:42
Re: Making it Random - by jamesbond007 - 27.12.2011, 07:15

Forum Jump:


Users browsing this thread: 1 Guest(s)