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[randint])return SendClientMessage(playerid, MainColors[2], "incorrect interior.");
new string[128];
format(string,sizeof(string),"*** The random %d map has now started!",randint);
SendClientMessageToAll(COLOR_ROUND,string);
PrepareRound();
SetTimerEx("StartRound",5000,0,"ii",randint,0);
return 1;
}
return 1;
}
new const
Float: InteriorsB[] =
{
40,
41,
43,
44,
45,
46,
47,
48,
49,
50
}
;
Try see if this works, all you need to do is replace your array with this:
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;
}