Raised This Month: $68 Target: $400
 17% 

[Bug] Needs a fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
New and Clueless
Senior Member
Join Date: Dec 2015
Old 06-21-2016 , 23:46   [Bug] Needs a fix
Reply With Quote #1

So when you use this plugin:

https://forums.alliedmods.net/showth...hlight=trigger

and this:

https://forums.alliedmods.net/showth...light=punisher

punisher has this part of code:

Code:
			//find what weapon type the player has
			switch(get_user_weapon(player))
			{
			case CSW_P228 : ca = 13;
			case CSW_SCOUT : ca = 10;
			case CSW_HEGRENADE : ca = 1;
			case CSW_XM1014 : ca = 7;
			case CSW_C4 : ca = 1;
			case CSW_MAC10 : ca = 30;
			case CSW_AUG : ca = 30;
			case CSW_SMOKEGRENADE : ca = 1;
			case CSW_ELITE : ca = 15;
			case CSW_FIVESEVEN : ca = 20;
			case CSW_UMP45 : ca = 25;
			case CSW_SG550 : ca = 30;
			case CSW_GALI : ca = 35;
			case CSW_FAMAS : ca = 25;
			case CSW_USP : ca = 12;
			case CSW_GLOCK18 : ca = 20;
			case CSW_AWP : ca = 10;
			case CSW_MP5NAVY : ca = 30;
			case CSW_M249 : ca = 100;
			case CSW_M3 : ca = 8;
			case CSW_M4A1 : ca = 30;
			case CSW_TMP : ca = 30;
			case CSW_G3SG1 : ca = 20;
			case CSW_FLASHBANG : ca = 2;
			case CSW_DEAGLE: ca = 7;
			case CSW_SG552 : ca = 30;
			case CSW_AK47 : ca = 30;
			case CSW_P90 : ca = 50;
			}
so when you use first plugin, the first plugin sets more ammo to the clip, but second one sets back the clip to normal limits, e.g. first plugin makes ak47 ammo 45, second plugin makes it back to 30, and just adds the ammo from there when you shoot. Anybody know what to do? need to make these plugins not collide somehow

here are codes if anybody can do anything:

Trigger:
Spoiler


Punisher:
Spoiler


Thank you.
__________________

ANY SCRIPTER ON THIS FORUM HAS FREE VIP/ADMIN IN MY SERVER!
New and Clueless is offline
heliumdream
Senior Member
Join Date: Aug 2006
Old 07-08-2016 , 10:46   Re: [Bug] Needs a fix
Reply With Quote #2

1) Just why? If a player has Punisher, they have effectively infinite ammo...who cares if you have a larger clip?

2) This is not so much a bug, but a code collision.

I didn't look super hard, but make sure the number tables in both scripts share the same values.
The values you punch in for trigger, you should make the same changes to the punisher script.
This should make punisher aware of the newer, bigger clip sizes initiated by trigger.
__________________


Thank you for playing.
heliumdream is offline
New and Clueless
Senior Member
Join Date: Dec 2015
Old 07-08-2016 , 13:03   Re: [Bug] Needs a fix
Reply With Quote #3

Quote:
Originally Posted by heliumdream View Post
1) Just why? If a player has Punisher, they have effectively infinite ammo...who cares if you have a larger clip?

2) This is not so much a bug, but a code collision.

I didn't look super hard, but make sure the number tables in both scripts share the same values.
The values you punch in for trigger, you should make the same changes to the punisher script.
This should make punisher aware of the newer, bigger clip sizes initiated by trigger.
1) The version of punisher I use adds ammo every second instead of just spray non stop. I still want there to be a reload time, so with bigger ammo clips you can shoot longer without reload.

2) Yes, one code sets ammo as 45 and other code sets it back to 30 and they keep fighting.

Think you can do it? I don't have much of an idea of how I would do this.
__________________

ANY SCRIPTER ON THIS FORUM HAS FREE VIP/ADMIN IN MY SERVER!
New and Clueless is offline
heliumdream
Senior Member
Join Date: Aug 2006
Old 07-08-2016 , 14:25   Re: [Bug] Needs a fix
Reply With Quote #4

make the numbers in these tables match.

Code:
//Trigger
trigger_level 16
weapon_maxclip p228 20
weapon_maxclip scout 15
weapon_maxclip xm1014 12
weapon_maxclip mac10 45
weapon_maxclip aug 45
weapon_maxclip elite 45
weapon_maxclip fiveseven 30
weapon_maxclip ump45 35
weapon_maxclip sg550 45
weapon_maxclip galil 50
weapon_maxclip famas 35
weapon_maxclip usp 18
weapon_maxclip glock18 30
weapon_maxclip awp 15
weapon_maxclip mp5navy 45
weapon_maxclip m249 120
weapon_maxclip m3 12
weapon_maxclip m4a1 45
weapon_maxclip tmp 45
weapon_maxclip g3sg1 45
weapon_maxclip deagle 12
weapon_maxclip sg552 45
weapon_maxclip ak47 45
weapon_maxclip p90 60
Code:
//Punisher
case CSW_P228 : ca = 13;
			case CSW_SCOUT : ca = 10;
			case CSW_HEGRENADE : ca = 1;
			case CSW_XM1014 : ca = 7;
			case CSW_C4 : ca = 1;
			case CSW_MAC10 : ca = 30;
			case CSW_AUG : ca = 30;
			case CSW_SMOKEGRENADE : ca = 1;
			case CSW_ELITE : ca = 15;
			case CSW_FIVESEVEN : ca = 20;
			case CSW_UMP45 : ca = 25;
			case CSW_SG550 : ca = 30;
			case CSW_GALI : ca = 35;
			case CSW_FAMAS : ca = 25;
			case CSW_USP : ca = 12;
			case CSW_GLOCK18 : ca = 20;
			case CSW_AWP : ca = 10;
			case CSW_MP5NAVY : ca = 30;
			case CSW_M249 : ca = 100;
			case CSW_M3 : ca = 8;
			case CSW_M4A1 : ca = 30;
			case CSW_TMP : ca = 30;
			case CSW_G3SG1 : ca = 20;
			case CSW_FLASHBANG : ca = 2;
			case CSW_DEAGLE: ca = 7;
			case CSW_SG552 : ca = 30;
			case CSW_AK47 : ca = 30;
			case CSW_P90 : ca = 50;
__________________


Thank you for playing.
heliumdream is offline
New and Clueless
Senior Member
Join Date: Dec 2015
Old 07-08-2016 , 19:33   Re: [Bug] Needs a fix
Reply With Quote #5

Quote:
Originally Posted by heliumdream View Post
make the numbers in these tables match.

Code:
//Trigger
trigger_level 16
weapon_maxclip p228 20
weapon_maxclip scout 15
weapon_maxclip xm1014 12
weapon_maxclip mac10 45
weapon_maxclip aug 45
weapon_maxclip elite 45
weapon_maxclip fiveseven 30
weapon_maxclip ump45 35
weapon_maxclip sg550 45
weapon_maxclip galil 50
weapon_maxclip famas 35
weapon_maxclip usp 18
weapon_maxclip glock18 30
weapon_maxclip awp 15
weapon_maxclip mp5navy 45
weapon_maxclip m249 120
weapon_maxclip m3 12
weapon_maxclip m4a1 45
weapon_maxclip tmp 45
weapon_maxclip g3sg1 45
weapon_maxclip deagle 12
weapon_maxclip sg552 45
weapon_maxclip ak47 45
weapon_maxclip p90 60
Code:
//Punisher
case CSW_P228 : ca = 13;
			case CSW_SCOUT : ca = 10;
			case CSW_HEGRENADE : ca = 1;
			case CSW_XM1014 : ca = 7;
			case CSW_C4 : ca = 1;
			case CSW_MAC10 : ca = 30;
			case CSW_AUG : ca = 30;
			case CSW_SMOKEGRENADE : ca = 1;
			case CSW_ELITE : ca = 15;
			case CSW_FIVESEVEN : ca = 20;
			case CSW_UMP45 : ca = 25;
			case CSW_SG550 : ca = 30;
			case CSW_GALI : ca = 35;
			case CSW_FAMAS : ca = 25;
			case CSW_USP : ca = 12;
			case CSW_GLOCK18 : ca = 20;
			case CSW_AWP : ca = 10;
			case CSW_MP5NAVY : ca = 30;
			case CSW_M249 : ca = 100;
			case CSW_M3 : ca = 8;
			case CSW_M4A1 : ca = 30;
			case CSW_TMP : ca = 30;
			case CSW_G3SG1 : ca = 20;
			case CSW_FLASHBANG : ca = 2;
			case CSW_DEAGLE: ca = 7;
			case CSW_SG552 : ca = 30;
			case CSW_AK47 : ca = 30;
			case CSW_P90 : ca = 50;
Ok now lets say I pick m4a1, I have 30 ammo, after few seconds punisher adds it up to 45, it doesn't stop at 30. So trigger is useless now, because punisher kind of has that superhero now.
__________________

ANY SCRIPTER ON THIS FORUM HAS FREE VIP/ADMIN IN MY SERVER!
New and Clueless is offline
New and Clueless
Senior Member
Join Date: Dec 2015
Old 07-12-2016 , 20:48   Re: [Bug] Needs a fix
Reply With Quote #6

any ideas?
__________________

ANY SCRIPTER ON THIS FORUM HAS FREE VIP/ADMIN IN MY SERVER!
New and Clueless is offline
Reply


Thread Tools
Display Modes

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 07:39.


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