Ammo help
#1

Can someone help me how to make all weapon maximum ammo is 200 but the M4/AK47 is 500?
Reply
#2

This is simple. Whenever a player is given a weapon or ammo, you check the ammo before-hand to ensure it doesn't exceed the limit you stated. If it does however, you refuse to give that person the weapon with the warning that it exceeds the ammo limit.

Use the following functions:

GetPlayerAmmo

or, since sometimes the weapon isnt scrolled:

GetPlayerWeaponData
Reply
#3

Man, I want all the weapons ammo must be only 200 and for the M4/AK47 are 500 not taking their AMMO.

Example: I give a gun to myself, I want it to be only 500 ammo because at my server when I giving a gun to my self its unlimited ammo.
Reply
#4

Then change the ammo you're giving in GivePlayerWeapon or SetPlayerAmmo.
Reply
#5

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
Then change the ammo you're giving in GivePlayerWeapon or SetPlayerAmmo.
This is what I meant with when a player is given a weapon. If you want to go the extra mile to reduce all ammo no matter where it is given, you're gonna have to do what I said and it'll definitely take longer. Just look up your command and change the functions named by CalvinC.
Reply
#6

Here is the PWN please help me.

http://pastebin.com/xp85bHma
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)