Ostatnio postanowilem troche wrocic do ZPA 1.6.1 i mam pewien problem
Chce ustawic np: na Swarm Mode zeby na np: 5sec, nie moglo sie ruszac (nie dalo sie ich zabic itp)
// Start swarm mode start_swarm_mode(id, mode) { // Get alive players count static iPlayersnum iPlayersnum = fnGetAlive() static sound[64] if ((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_SWARM) && random_num(1, get_pcvar_num(cvar_swarmchance)) == get_pcvar_num(cvar_swarm) && iPlayersnum >= get_pcvar_num(cvar_swarmminplayers)) || mode == MODE_SET) { // Swarm Mode g_swarmround = true g_currentmode = MODE_SWARM g_lastmode = MODE_SWARM // Prevent Infection g_allowinfection = false // Make sure there are alive players on both teams (BUGFIX) if (!fnGetAliveTs()) { // Move random player to T team id = fnGetRandomAlive(random_num(1, iPlayersnum)) remove_task(id+TASK_TEAM) fm_cs_set_user_team(id, FM_CS_TEAM_T) fm_user_team_update(id) } else if (!fnGetAliveCTs()) { // Move random player to CT team id = fnGetRandomAlive(random_num(1, iPlayersnum)) remove_task(id+TASK_TEAM) fm_cs_set_user_team(id, FM_CS_TEAM_CT) fm_user_team_update(id) } // Turn every T into a zombie for (id = 1; id <= g_maxplayers; id++) { // Not alive if (!g_isalive[id]) continue; // Not a Terrorist if (fm_cs_get_user_team(id) != FM_CS_TEAM_T) continue; // Turn into a zombie zombieme(id, 0, 0, 1, 0, 0) } // Play swarm sound ArrayGetString(sound_swarm, random_num(0, ArraySize(sound_swarm) - 1), sound, charsmax(sound)) PlaySound(sound); // Show Swarm HUD notice set_hudmessage(20, 255, 20, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1) ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_SWARM") // Start ambience sounds if (g_ambience_sounds[AMBIENCE_SOUNDS_SWARM]) { remove_task(TASK_AMBIENCESOUNDS) set_task(2.0, "ambience_sound_effects", TASK_AMBIENCESOUNDS) } // Mode fully started! g_modestarted = true set_task(1.0, "zamrozenie", id) g_newround = false // Round start forward ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_SWARM, 0); // Stop here [BUGFIX] return; } // Give chance to another game mode start_plague_mode(0, MODE_NONE) }
ustawilem zeby po chwili odpalalo "zamrozenie"
set_task(1.0, "zamrozenie", id)
public zamrozenie(id) { for(new id = 1;id <= g_maxplayers;id++){ if(!is_user_alive(id)) continue; if(get_user_team(id) == 1) { g_frozen [id]= true; set_user_godmode(id, 1); set_task(5.0, "reset", id); } } } public reset(id) { if(!is_user_alive(id)) return; g_frozen [id] = false; set_user_godmode(id, 0); }
i tu problem, ze w ogóle to nie dziala, wsadzalem tam jakies proste funkcje czy w ogóle odpala ten kawalem kodu, i w ogóle go nie odpala, o czyms zapomnialem po dlugiej przerwie?