If you dont want to write it all down by the pictures you can copy paste these
Code:
new g_used_inf[33] // inf bomb per man
new g_used_madnes[33] // maddnes per man
Code:
for(new id = 1; id <= g_maxplayers; id++)
{
g_used_inf[id] = 0;
g_used_madnes[id] = 0;
}
}
Code:
cvar_infbomblimit, cvar_infbomblimitforeachplayer,
cvar_madnesslimit, cvar_madnesslimitforeachplayer,
Code:
cvar_madnesslimitforeachplayer = register_cvar("zp_extra_madness_limit_foreachplayer", "1")
cvar_infbomblimitforeachplayer = register_cvar("zp_extra_infbomb_limit_foreachplayer", "1")
Code:
{
if(fnGetZombies() > fnGetHumans())
{
client_print(id, print_center,"You can't use Infection bomb if there is more zombies than humans!");
g_ammopacks[id] += ArrayGetCell(g_extraitem_cost, EXTRA_INFBOMB) // return ammo
return;
}
if(g_used_inf[id] >= get_pcvar_num(cvar_infbomblimitforeachplayer))
{
client_print(id, print_center, "You can use Infection bomb %d time%s per round!", get_pcvar_num(cvar_infbomblimitforeachplayer), get_pcvar_num(cvar_infbomblimitforeachplayer) > 1 ? "s" : "");
g_ammopacks[id] += ArrayGetCell(g_extraitem_cost, EXTRA_INFBOMB) // return ammo
return;
}
// Increase infection bomb purchase count for this round
g_infbombcounter++
g_used_inf[id]++;
Code:
case EXTRA_MADNESS: // Zombie Madness
{
if(g_used_madnes[id] >= get_pcvar_num(cvar_madnesslimitforeachplayer))
{
client_print(id, print_center, "You can use Zombie Madness %d time%s per round!", get_pcvar_num(cvar_infbomblimitforeachplayer), get_pcvar_num(cvar_madnesslimitforeachplayer) > 1 ? "s" : "");
g_ammopacks[id] += ArrayGetCell(g_extraitem_cost, EXTRA_MADNESS) // return ammo
return;
}
// Increase madness purchase count for this round
g_madnesscounter++
g_used_madnes[id]++