Page 1 of 1

gg_cheap_equip

PostPosted: Sun Nov 16, 2008 9:52 pm
by Warren
gg_cheap_equip

Description:
Allows players to re-equip themselves in game using the !equip (by default) command.

NOTE: This has the same function as the !give command used in GunGame4, but gg_cheap_equip will not fix any issues in GunGame5.
NOTE: There is no "incorrect weapons" bug to be fixed in GunGame5, but I found that many people liked using the !give command in GunGame4 to reload themselves quickly. This lets you use that exploit.


Installation:
  • Extract this file to your server
  • Restart your server or reload GunGame

Servers running this addon:
http://www.game-monitor.com/search.php? ... e=variable

EventScripts Addon Manager
http://addons.eventscripts.com/addons/v ... heap_equip

Download

Re: gg_cheap_equip

PostPosted: Mon Nov 17, 2008 7:07 am
by Bottlecap
Awesome Job, Installed and working im gonna get love and hate for this one :roll:
Is ther a way to setup a dely, maybe a time delay or only allowed to use X amount of times per round would be better :-)

PostPosted: Mon Nov 17, 2008 7:34 am
by Warren
GunGame5 Cheap Equip Updated!
Version: 1.0.1
Updated on: 2008-11-17 01:32:49
Version Notes:
Added a gg_cheap_equip_uses variable to the configs. This controls how many times players can use the command per round.

PostPosted: Mon Nov 17, 2008 5:10 pm
by Saul
If people like using it to reload quicker, surely we could just make an unlimited ammo addon?

PostPosted: Mon Nov 17, 2008 7:02 pm
by RideGuy
I just want to point something out:

There was a bug in GG3 and GG4 that allowed a player to sometimes pickup the wrong weapon when leveling up. The !give command was created to help rectify this deficiency. The intent of !give was never to be a fast reload exploit, but that's how allot of people use it.

In GG5 you will always get the correct weapon. So the only use of this script is for a faster than normal reload time.


RideGuy

Re: gg_cheap_equip

PostPosted: Mon Nov 17, 2008 7:09 pm
by Warren
Sc0pE wrote:Description:
NOTE: This has the same function as the !give command used in GunGame4, but gg_cheap_equip will not fix any issues in GunGame5.
NOTE: There is no "incorrect weapons" bug to be fixed in GunGame5, but I found that many people liked using the !give command in GunGame4 to reload themselves quickly. This lets you use that exploit.

You didn't read that description RideGuy? ^^ ;D

PostPosted: Tue Nov 18, 2008 12:23 am
by RideGuy
I read the description. I just want it to be clear.

PostPosted: Thu Nov 20, 2008 10:47 pm
by Warren
GunGame5 Cheap Equip Updated!
Version: 1.0.2
Updated on: 2008-11-20 16:47:43
Version Notes:
Added the ability to disallow the command on specific levels.

PostPosted: Sun Nov 23, 2008 9:59 am
by IPS TOONCES
wow, very nice option that is great

Re: gg_cheap_equip

PostPosted: Thu Dec 04, 2008 1:51 am
by BucKeT
Great job ScOpE. Most of the players om my servers would miss this option on the GG5 server, so I'm glad you made this available and it works great!!!

PostPosted: Fri Dec 26, 2008 4:34 am
by vigor
is there anyway of making the command useable in console so it can be bound to a key?

Re:

PostPosted: Fri Dec 26, 2008 4:48 am
by Warren
vigor wrote:is there anyway of making the command useable in console so it can be bound to a key?

bind "h" "say !equip"

Re: gg_cheap_equip

PostPosted: Wed Dec 31, 2008 6:49 pm
by Moosehead
In gg_cheap_equip.cfg, if you set:

gg_cheap_equip_exceptions 0


The script bombs out when someone uses the command with this error:


Traceback (most recent call last):
  Exception caught: 30/12/2008 @ [21:26:12] [Occurences: 4]
  File "/opt/steam/cstrike/addons/eventscripts/_libs/python/gungamelib.py", line 1044, in __publicCommandCallback
    callback(userid, *arguments)
  Exception caught: 30/12/2008 @ [19:29:21] [Occurences: 3]
  File "/opt/steam/cstrike/addons/eventscripts/gungame/custom_addons/gg_cheap_equip/gg_cheap_equip.py", line 77, in giveNewWeapon
    if weapon in exceptions_list:

TypeError: argument of type 'int' is not iterable
 

PostPosted: Sun Feb 22, 2009 4:21 am
by Warren
GunGame5 Cheap Equip Updated!
Version: 1.0.3
Updated on: 2009-02-21 22:11:54
Version Notes:
gg_cheap_equip_uses now is based on lives instead of rounds.
Fixed an error caused by gg_cheap_equip_exceptions 0.

Re: gg_cheap_equip

PostPosted: Tue Mar 31, 2009 6:59 pm
by NachoDuck
Not sure what this is about but my console gets spammed with it.

Traceback (most recent call last):
  File "D:\HLServer\csserver\cstrike\addons\eventscripts\es.py", line 200, in triggerEvent
    self.EventListeners[eventname][listener](event_var)
  File "D:\HLServer\csserver\cstrike\addons\eventscripts\gungame\custom_addons\gg_cheap_equip\gg_cheap_equip.py", line 63, in player_death
   del dict_players[int(event_var['userid'])]
KeyError: 6

Re: gg_cheap_equip

PostPosted: Sat Sep 19, 2009 11:59 am
by jastrckl
I'm getting the following:

] rcon es_load gungame/custom_addons/gg_cheap_equip
==============================================================================
A GUNGAME EXCEPTION HAS BEEN CAUGHT
==============================================================================
...and logged in the error log. This file is available at:
-> addons/eventscripts/gungame/logs/errorlog 5.0.585.txt
==============================================================================
Report the following error at http://forums.gungame5.com in the respective
addon's topic, or as a GunGame bug.

The traceback is available below, the most recent call is at the end.
******************************************************************************
Traceback (most recent call last):
File "/home/cstrike/srcds/css/cstrike/addons/eventscripts/es.py", line 339, in loadModuleAddon
newaddon = __import__(importname)
File "/home/cstrike/srcds/css/cstrike/addons/eventscripts/gungame/custom_addons/gg_cheap_equip/gg_cheap_equip.py", line 34, in <module>
gg_cheap_equip_command = gungamelib.getVariableValue('gg_cheap_equip_command')
File "/home/cstrike/srcds/css/cstrike/addons/eventscripts/_libs/python/gungamelib.py", line 2248, in getVariableValue
raise ValueError('Unable to get variable value (%s): not registered.' % variableName)
ValueError: Unable to get variable value (gg_cheap_equip_command): not registered.
******************************************************************************
Could not open script for addons/eventscripts/gungame/custom_addons/gg_cheap_equip/es_gg_cheap_equip.txt
Error source (console): (no script)


thoughts?

PostPosted: Sat Sep 19, 2009 2:25 pm
by Warren
This is not how you load GunGame5 custom addons. Simply type gg_cheap_equip 1 in console, reload GunGame5, or restart the server.

PostPosted: Sun Sep 20, 2009 9:43 pm
by jastrckl
a server restart got it working (before that gg_cheap_equip wasn't added as a valid command in console).

Any word on the " File "D:\HLServer\csserver\cstrike\addons\eventscripts\gungame\custom_addons\gg_cheap_equip\gg_cheap_equip.py", line 63, in player_death" type error? I'm getting those as well.

Thanks!

-Josh

PostPosted: Mon Sep 21, 2009 1:23 am
by satoon101
The error shouldn't really affect gameplay. But to fix it, just change:
def player_death(event_var):
    del dict_players[int(event_var['userid'])]
to
def player_death(event_var):
    userid = int(event_var['userid'])
    if userid in dict_players:
        del dict_players[userid]
Satoon

Re: gg_cheap_equip

PostPosted: Fri Oct 02, 2009 4:21 am
by jastrckl
Hello, the above patch seems to work great, thanks!

Sorry to continue to bother, but does anyone know if it's possible to only permit one "!equip" per level? In other words I want to prevent it from being used the way !give is used to reload ammo quickly.

What I want to happen is use nonturbo gungame, you earn a level, you can stay on your current gun if you have more people to battle. Once you get to a quiet spot, you can !equip and move to the next weapon. However I don't want people to be able to !equip if they are already holding the weapon for the level they have earned. If they could still replace a weapon that they accidentally dropped with !equip that would be ideal, but not critical.

You may ask why I don't just run turbo, and the reason is with turbo sometimes if you face off against several enemies at once, you have to wait for a weapon switch before you can return fire, and die in the interim. This I want to avoid.

Thanks for all of the help!