AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Changing max BPammo for weapon (https://forums.alliedmods.net/showthread.php?t=162968)

Sp@jk 07-25-2011 05:16

Changing max BPammo for weapon
 
I am trying to replace 2 snipers ( g3sg1 and sg550 ) with bazooka
I did everything, and it works, just player can buy ammo and I don't want to player walk around with bazooka that has 90 rockets :) So what I want is a code that will help me to lower max bpammo of g3sg1 and sg550 from 90 to 5 :D

Sorry for bad English :)

razieljohn619 07-25-2011 05:28

Re: Changing max BPammo for weapon
 
http://forums.alliedmods.net/showthread.php?p=728613
if it's really g3sg1 and sg550 then change the ammo of g3sg1 and sg550 with this plugin

http://forums.alliedmods.net/showthread.php?p=720161
and if you want to change there BP ammo use this plugin

:D

Sp@jk 07-25-2011 05:43

Re: Changing max BPammo for weapon
 
that plugin changes max bpammo per ammo, not per weapon, so it will be steupid to have ak47 with max 5 bullets :)

Exolent[jNr] 07-25-2011 10:13

Re: Changing max BPammo for weapon
 
Quote:

Originally Posted by Sp@jk (Post 1517968)
that plugin changes max bpammo per ammo, not per weapon, so it will be steupid to have ak47 with max 5 bullets :)

BP ammo is shared among weapons that have the same ammo type.
If you have a Glock 18 and MP5 Navy and buy primary (or secondary) ammo, the ammo will increase for both weapons because they use the same ammo type.

Sp@jk 07-25-2011 15:28

Re: Changing max BPammo for weapon
 
WOW, I didn't noticed that weapons that use same type of ammo have same max bpammo limit :) is there any forward that is called when client buys primary ammo, so if he is buying primary ammo and has g3sg1 or sg550 to set his bpammo to 5 :)

razieljohn619 07-28-2011 07:56

Re: Changing max BPammo for weapon
 
Quote:

Originally Posted by Sp@jk (Post 1518320)
WOW, I didn't noticed that weapons that use same type of ammo have same max bpammo limit :) is there any forward that is called when client buys primary ammo, so if he is buying primary ammo and has g3sg1 or sg550 to set his bpammo to 5 :)

idk, but u have to press reload to reset the ammo and permanently make it like that

wrecked_ 07-28-2011 08:01

Re: Changing max BPammo for weapon
 
Quote:

Originally Posted by Sp@jk (Post 1518320)
WOW, I didn't noticed that weapons that use same type of ammo have same max bpammo limit :) is there any forward that is called when client buys primary ammo, so if he is buying primary ammo and has g3sg1 or sg550 to set his bpammo to 5 :)

http://wiki.amxmodx.org/Half-Life_1_Game_Events#Money

Store each player's bpammo globally and hook this event. Make sure you compare the stored value and the new bpammo to make sure they bought bpammo and not something like a gun. Since money must be deducted every time the player buys bpammo, this is an indirect solution to hooking it.


All times are GMT -4. The time now is 00:51.

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