hi guys, i want fix this codes:
PHP Code:
else if ((mode == MODE_NONE && (g_lastmode != MODE_NIGHT) && random_num(1, 30) == 1 && floatround(iPlayersnum*0.4, floatround_ceil) >= 2 && floatround(iPlayersnum*0.4, floatround_ceil) < iPlayersnum && iPlayersnum >= 4) || mode == MODE_NIGHT)
{
// Nightmare Mode
g_nightround = true
g_lastmode = MODE_NIGHT
// iMaxZombies is rounded up, in case there aren't enough players
iMaxZombies = floatround(iPlayersnum*0.4, floatround_ceil)
iZombies = 0
// Randomly turn iMaxZombies players into nemesis
while (iZombies < iMaxZombies)
{
// Keep looping through all players
if (++id > g_maxplayers) id = 1
// Dead or already a nemesis
if (!g_isalive[id] || g_nemesis[id])
continue;
// Random chance
if (random_num(0, 1))
{
// Turn into a nemesis
zombieme(id, 0, 1, 0, 0, 0)
iZombies++
// Apply nemesis health
fm_set_user_health(id, 90000)
}
}
iZombies = 0
// Randomly turn iMaxZombies players into assassins
while (iZombies < iMaxZombies)
{
// Keep looping through all players
if (++id > g_maxplayers) id = 1
// Dead or already a nemesis/assassin
if (!g_isalive[id] || g_nemesis[id] || g_assassin[id])
continue;
// Random chance
if (random_num(0, 1))
{
// Turn into an assassin
zombieme(id, 0, 0, 1, 0, 0)
iZombies++
// Apply assassin health
fm_set_user_health(id, 30000)
}
}
iZombies = 0
// Randomly turn iMaxZombies players into survivors
while (iZombies < iMaxZombies)
{
// Keep looping through all players
if (++id > g_maxplayers) id = 1
// Dead or already a nemesis/assassin/survivor
if (!g_isalive[id] || g_nemesis[id] || g_assassin[id] || g_survivor[id])
continue;
// Random chance
if (random_num(0, 1))
{
// Turn into a survivor
humanme(id, 1, 0, 0)
iZombies++
// Apply survivor health
fm_set_user_health(id, 12000)
}
}
// Turn the remaining players into snipers
for (id = 1; id <= g_maxplayers; id++)
{
// Only those of them who aren't nemesis/assassin/survivor/sniper
if (!g_isalive[id] || g_nemesis[id] || g_assassin[id] || g_survivor[id] || g_sniper[id])
continue;
// If not, turn him into one
humanme(id, 0, 1, 0)
// Apply sniper health
fm_set_user_health(id, 10000)
}
// Play nightmare sound
ArrayGetString(sound_nightmare, random_num(0, ArraySize(sound_nightmare) - 1), sound, charsmax(sound))
PlaySound(sound);
// Show Nightmare HUD notice
set_hudmessage(255, 20, 20, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "Nightmare Round !!!")
// Mode fully started!
g_modestarted = true
// Round start forward
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_NIGHT, 0);
}
when the nightmare start the server crashed :/
what the problem with this codes??
__________________