Raised This Month: $32 Target: $400
 8% 

Help / Support This is a tutorial for limiting zombies extra items (inf bomb, madness, etc)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
undertaker5
Member
Join Date: Sep 2013
Location: Denmark
Old 07-19-2020 , 09:54   This is a tutorial for limiting zombies extra items (inf bomb, madness, etc)
Reply With Quote #1

In this tutorial you need to edit your zombieplague40.ini(main sma file) or whatever version you use and edit some line in there
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	161
Size:	34.1 KB
ID:	182688   Click image for larger version

Name:	2.png
Views:	112
Size:	27.8 KB
ID:	182689   Click image for larger version

Name:	3.png
Views:	90
Size:	21.3 KB
ID:	182690   Click image for larger version

Name:	4.png
Views:	89
Size:	19.0 KB
ID:	182691   Click image for larger version

Name:	5.png
Views:	87
Size:	47.1 KB
ID:	182692  

Click image for larger version

Name:	6.png
Views:	108
Size:	32.4 KB
ID:	182693  
undertaker5 is offline
undertaker5
Member
Join Date: Sep 2013
Location: Denmark
Old 07-26-2020 , 19:13   Re: This is a tutorial for limiting zombies extra items (inf bomb, madness, etc)
Reply With Quote #2

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]++
undertaker5 is offline
Old 07-27-2020, 07:23
MagNNusS
This message has been deleted by MagNNusS. Reason: nvm
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 18:12.


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