Raised This Month: $51 Target: $400
 12% 

[ZP43] Swarm mode only 1 person infected in half server


Post New Thread Reply   
 
Thread Tools Display Modes
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-07-2016 , 15:28   Re: [ZP43] Swarm mode only 1 person infected in half server
Reply With Quote #11

Quote:
Originally Posted by NiHiLaNTh View Post
You sure about 50.0?
0.5 actually
Quote:
Originally Posted by New and Clueless View Post
im pretty sure i replaced the code correctly, im using zp 4.3 fix5a, i have made alot of modifications/changes since then but the main 2 zp plugins (zombie_plague40 and zp_zclasses40) i left alone for most of it.
As NiHiLaNTh noticed, it should be 0.5 instead of 50. Replace and try again.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
New and Clueless
Senior Member
Join Date: Dec 2015
Old 02-07-2016 , 21:17   Re: [ZP43] Swarm mode only 1 person infected in half server
Reply With Quote #12

Quote:
Originally Posted by georgik57 View Post
0.5 actually

As NiHiLaNTh noticed, it should be 0.5 instead of 50. Replace and try again.
it compiled no errors this time but still only 1 person got infected
actually 0 people got infected, so it was only all CTs
__________________

ANY SCRIPTER ON THIS FORUM HAS FREE VIP/ADMIN IN MY SERVER!

Last edited by New and Clueless; 02-07-2016 at 21:52.
New and Clueless is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-08-2016 , 03:54   Re: [ZP43] Swarm mode only 1 person infected in half server
Reply With Quote #13

Quote:
Originally Posted by New and Clueless View Post
it compiled no errors this time but still only 1 person got infected
actually 0 people got infected, so it was only all CTs
I'm pretty sure you didn't place the code correspondingly.
Code:
    else 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_SWARM)     {               // Swarm Mode         g_swarmround = true         g_lastmode = MODE_SWARM                 // 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)         }                 // 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")                 // Mode fully started!         g_modestarted = true                 // Round start forward         ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_SWARM, 0);     }
-->
Code:
    else 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_SWARM)     {               // Swarm Mode         g_swarmround = true         g_lastmode = MODE_SWARM                 // iMaxZombies is rounded up, in case there aren't enough players         iMaxZombies = floatround(iPlayersnum*0.5, floatround_ceil)         iZombies = 0                 // Randomly turn iMaxZombies players into zombies         while (iZombies < iMaxZombies)         {             // Keep looping through all players             if (++id > g_maxplayers) id = 1                         // Dead or already a zombie             if (!g_isalive[id] || g_zombie[id])                 continue;                         // Random chance             if (random_num(0, 1))             {                 // Turn into a zombie                 zombieme(id, 0, 0, 1, 0)                 iZombies++             }         }                 // Turn the remaining players into humans         for (id = 1; id <= g_maxplayers; id++)         {             // Only those of them who aren't zombies             if (!g_isalive[id] || g_zombie[id])                 continue;                         // Switch to CT             if (fm_cs_get_user_team(id) != FM_CS_TEAM_CT) // need to change team?             {                 remove_task(id+TASK_TEAM)                 fm_cs_set_user_team(id, FM_CS_TEAM_CT)                 fm_user_team_update(id)             }         }                 // 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")                 // Mode fully started!         g_modestarted = true                 // Round start forward         ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_SWARM, 0);     }
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
New and Clueless
Senior Member
Join Date: Dec 2015
Old 02-08-2016 , 19:05   Re: [ZP43] Swarm mode only 1 person infected in half server
Reply With Quote #14

Quote:
Originally Posted by georgik57 View Post
I'm pretty sure you didn't place the code correspondingly.
yes you are right, i didnt do it properly, but i have removed the plugin that forces all humans to be on CT as that plugin was causing some problems , so sorry for wasting your time here, this probably will work, if i will have to put that plugin back i will definitely try this, thanks a lot man, i see you are very good with scripting.
__________________

ANY SCRIPTER ON THIS FORUM HAS FREE VIP/ADMIN IN MY SERVER!

Last edited by New and Clueless; 02-08-2016 at 19:06.
New and Clueless is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode