Nister_Just
Умник
Как сделать , чтобы после рандома люди спавнились с меня + Как вписать туда спавн ZombieSetup(playerid,2);
PHP:
stock RandomZombie(gid)
{
new online = GetTeamPlayersAlive(TEAM_HUMAN);
if(online < 2) return SCMTA(COLOR_GREY,!"- Необходимо более 2 человек для начала игры. Время продлено на 30 секунд!"),RandomTime = 30;
online = floatround(online/2,floatround_floor);
new zombie,randid = INVALID_PLAYER_ID;
while(zombie != online)
{
do
{
randid = RandomEx(0,GetPlayerPoolSize());
if(!IsPlayerConnected(randid) || !pInfo[randid][pLogged] || Player_Team[randid] == TEAM_ZOMBIE || Zapretka(randid)) randid = INVALID_PLAYER_ID;
}
while(randid == INVALID_PLAYER_ID);
if(randid != INVALID_PLAYER_ID) SetPVarInt(randid,"ZombieCount",GetPVarInt(randid,"ZombieCount")+1),ZombieSetup(randid,1),zombie ++;
}
SCMTA(COLOR_WHITE,!"------------------------------------");
SCMTA(COLOR_GREEN,!"Заразил несколько людей!");
SCMTA(COLOR_WHITE,!"------------------------------------");
Game_Time = MAX_MAPTIME;
#if DEBUG_STATUS == true
return printf("[DEBUG | RandomZombie]: Распределение половины игроков для игры %d завершено",gid);
#else
return true;
#endif
}
