Page 1 of 1

gg_nade_bonus, give weapon with 7 shells

PostPosted: Mon Jan 23, 2012 5:31 am
by Neka
Hi!
I want to change included addon named gg_nade boonus just one thing - giving weapon not with full ammo, just 7 shells (full charge in Desert Eagle). I find this:
/gungame51/scripts/included/gg_nade_bonus/gg_nade_bonus.py, 335
ggPlayer.give(weapon, False, True)

I add this below
ggPlayer.setAmmo(weapon, 7)

But it says, that ggPlayer is not instance of Playerlib, and haven't that method.

Help me do this, please! Thanks for answering!

PostPosted: Mon Jan 23, 2012 3:38 pm
by satoon101
Yeah, ggPlayer is a gungame51.core.players.players.Player instance not a playerlib.Player instance. Use this instead:
getPlayer(userid).setAmmo(weapon, 7)
Satoon

PostPosted: Tue Jan 24, 2012 6:23 am
by Neka
Thank you! It works just fine!

PostPosted: Thu Feb 02, 2012 4:02 pm
by Neka
In one moment it not work as i want. After killing enemy from this deagle, it charge to 7 shells again (autoreload on lvlup). Must to be 7 shells and no more (how it would if alutoreload on lvlup = 0).

How can i fix it?