gg_nade_bonus, give weapon with 7 shells

Ask questions and share info about GunGame 5

gg_nade_bonus, give weapon with 7 shells

Postby Neka » Mon Jan 23, 2012 5:31 am

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!
Neka

Private
Private
 
Posts: 40
Joined: Thu Sep 01, 2011 4:22 am

Postby satoon101 » Mon Jan 23, 2012 3:38 pm

Yeah, ggPlayer is a gungame51.core.players.players.Player instance not a playerlib.Player instance. Use this instead:
getPlayer(userid).setAmmo(weapon, 7)
Satoon
satoon101

Site Admin
Site Admin
 
Posts: 1055
Joined: Thu Oct 09, 2008 4:27 pm

Postby Neka » Tue Jan 24, 2012 6:23 am

Thank you! It works just fine!
Neka

Private
Private
 
Posts: 40
Joined: Thu Sep 01, 2011 4:22 am

Postby Neka » Thu Feb 02, 2012 4:02 pm

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?
Neka

Private
Private
 
Posts: 40
Joined: Thu Sep 01, 2011 4:22 am



Return to General Discussion

Who is online

Users browsing this forum: No registered users and 18 guests