ETMods.net

N!tmod, a Wolfenstein: Enemy Territory Modification!

You are not logged in.

Announcement

You can donate to help us keeping services online.

#1 18-Sep-12 00:17:16

OldMan
BETA Tester
Registered: 23-Sep-10
Posts: 103

[FIXED] - Limited poison syringe

Hi I would like to limit the poison syringe at 1. How should the weapons script?


weaponDef
{
//Custom stuff start here.
    both {
        // Available parameters.
        maxammo 0                    // Max ammo you can carry for this weapon
        maxclip 0                    // Max ammount of ammo in clip for this weapon
        defaultStartingAmmo 1            // Ammount of ammo you spanw with
        defaultStartingClip 1            // Ammout of ammo in the 1st clip you spawn with
                }

//End of custom

    client {
        pickupModel            "models/multiplayer/syringe/0syringe.md3"
        weaponConfig        "models/multiplayer/syringe/weapon.cfg"
        handsModel            "models/multiplayer/syringe/v_syringe_hand.md3"
        flashSound        "sound/weapons/poison/poison_slash2.wav"    // supports up to 4 flash sounds
        weaponSelectedIcon    "icons/iconw_syringe_1_select"
       
        modModel 0        "models/multiplayer/syringe/poison"

        firstPerson {
            model        "models/multiplayer/syringe/v_syringe.md3"
            axisskin    "models/multiplayer/syringe/poison_axis.skin"
            alliedskin    "models/multiplayer/syringe/poison_allied.skin"
            weaponLink
            {
                part 0
                {
                    tag    "tag_weapon"
                    model    "models/multiplayer/syringe/v_syringe_barrel.md3"
            axisskin    "models/multiplayer/syringe/poison_axis.skin"
            alliedskin    "models/multiplayer/syringe/poison_allied.skin"
                }

            }
        }
       
        thirdPerson {
            model        "models/multiplayer/syringe/syringe.md3"
            axisskin    "models/multiplayer/syringe/poison_axis.skin"
            alliedskin    "models/multiplayer/syringe/poison_allied.skin"
        }
    }
}


With this script it works but after use poison syringe i can not switch weapons for  5-20 seconds. Why?

Thx

OldMn

Last edited by OldMan (18-Sep-12 17:56:32)

Offline

#2 19-Sep-12 04:44:12

ailmanki
BETA Tester
Registered: 08-Jun-12
Posts: 42
Website

Re: [FIXED] - Limited poison syringe

try setting these to 1
maxammo 0                    // Max ammo you can carry for this weapon
maxclip 0                    // Max ammount of ammo in clip for this weapon

else it should be possible to achieve same effect with a lua script.
and no idea if it helps, but try starting a map with /devmap, then set "developer 1", and then check for error msgs..


b_350_20_692108_381007_FFFFFF_000000.pngb_350_20_692108_381007_FFFFFF_000000.png

Offline

#3 19-Sep-12 10:56:50

OldMan
BETA Tester
Registered: 23-Sep-10
Posts: 103

Re: [FIXED] - Limited poison syringe

This does not work. I'd like only one available and not rechargeable.
I can not LUA.

Offline

#4 10-Oct-12 11:15:28

OldMan
BETA Tester
Registered: 23-Sep-10
Posts: 103

Re: [FIXED] - Limited poison syringe

I have found this lua script for adrenalin:


--
-- More Adrenaline for Medics 0.1
-- by nano <nano@fooo.org>
--
-- This is a small module for trickjump servers. It gives
-- medics on spawn a specified amount of adrenaline needles.
--
-- To add adrenaline needles you have to use the ammoindex
-- 11 (WP_MEDIC_SYRINGE) and not 46 (WP_MEDIC_ADRENALINE)
-- since they belong together just like WP_LUGER and WP_MP40
-- (line 1396-1419 in game/bg_misc.c).
--

AMOUNT = 500
et.CS_PLAYERS = 689

function et.GetPlayerCS(clientNum, key)
  local cs = et.trap_GetConfigstring(et.CS_PLAYERS + clientNum)
  return et.Info_ValueForKey(cs, key)
end

function et_ClientSpawn(clientNum, revived)
  if tonumber(et.GetPlayerCS(clientNum, "c")) == 1 then
    et.gentity_set(clientNum, "ps.ammoclip", 11, AMOUNT)
    et.gentity_set(clientNum, "ps.ammo", 11, AMOUNT)
  end
end



Which number has the poison syringe in ammoindex?

Last edited by OldMan (10-Oct-12 11:40:31)

Offline

#5 10-Oct-12 14:20:25

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,098

Re: [FIXED] - Limited poison syringe

typedef enum weapon_s
{
	WP_NONE, 			//  0
	WP_KNIFE, 			//  1
	WP_LUGER, 			//  2
	WP_MP40, 			//  3
	WP_GRENADE_LAUNCHER, 		//  4
	WP_PANZERFAUST,			//  5
	WP_FLAMETHROWER,		//  6
	WP_COLT, 			//  7
	WP_THOMPSON,			//  8
	WP_GRENADE_PINEAPPLE, 		//  9
	WP_STEN, 			// 10
	WP_MEDIC_SYRINGE,		// 11
	WP_AMMO, 			// 12
	WP_ARTY, 			// 13
	WP_SILENCER,			// 14
	WP_DYNAMITE,			// 15
	WP_SMOKETRAIL,			// 16
	VERYBIGEXPLOSION,		// 17
	WP_MEDKIT,			// 18
	WP_BINOCULARS,			// 19
	WP_PLIERS,			// 20
	WP_SMOKE_MARKER,		// 21
	WP_KAR98,			// 22
	WP_CARBINE,			// 23
	WP_GARAND,			// 24
	WP_LANDMINE,			// 25
	WP_SATCHEL,			// 26
	WP_SATCHEL_DET,			// 27
	WP_SMOKE_BOMB,			// 28
	WP_MOBILE_MG42,			// 29
	WP_K43,				// 30
	WP_FG42, 			// 31
	WP_DUMMY_MG42, 			// 32
	WP_MORTAR, 			// 33
	WP_AKIMBO_COLT,			// 34
	WP_AKIMBO_LUGER,		// 35
	WP_GPG40,			// 36
	WP_M7,				// 37
	WP_SILENCED_COLT,		// 38
	WP_GARAND_SCOPE,		// 39
	WP_K43_SCOPE,			// 40
	WP_FG42SCOPE,			// 41
	WP_MORTAR_SET,			// 42
	WP_MEDIC_ADRENALINE,		// 43
	WP_AKIMBO_SILENCEDCOLT, 	// 44
	WP_AKIMBO_SILENCEDLUGER, 	// 45
	WP_MOBILE_MG42_SET,		// 46
	WP_POISON_SYRINGE,		// 47
	WP_BOMB,			// 48
	WP_TRIPMINE,			// 49
	WP_POISON_BOMB,			// 50
	WP_POISON_MINE,			// 51
	WP_NUM_WEAPONS			// 52
} weapon_t;

Also, you will need to change et.CS_PLAYERS value to 64 in your LUA script.

et.CS_PLAYERS = 64

Regarding the issue with weapon scripts, i think i found what's wrong, some values are still hardcoded in the code and ignore weaponscripts values. I'll try to fix them for 2.2.1 smile


iluvnitmod.png

Offline

#6 10-Oct-12 15:52:53

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,098

Re: [FIXED] - Limited poison syringe

Alright the problem is fixed for 2.2.1 big_smile

While fixing this problem i also noticed a lot of wierd things with other weapons max ammo, spawn ammo, etc...

Those are problems that have probably been introduced since N!tmod 1.4, so don't be surprised if there are changes in the max ammo a player can carry in 2.2.1, it will just be the way it should have been from the start.

For exemple, players can actually spawn with 16 revive syringes, but the maximum is 12. They can also spawn with 8 knives while they should only spawn with 4 and be able to carry up to 8 of them.

This probably also results in players using more ammopacks than they really need.

Small problems, barely noticeable, but they need to be fixed anyway ^^

Thanks for reporting this problem, because of you i'm now able to fix a few others tongue


iluvnitmod.png

Offline

#7 11-Oct-12 01:36:21

OldMan
BETA Tester
Registered: 23-Sep-10
Posts: 103

Re: [FIXED] - Limited poison syringe

Hi N!trox,

Unfortunately, even work the LUA script not properly. Ammoclip will set from 0 again to 1.
I wait of Nitmod 2.2.1 and then I will write a weapon scripts.  smile

I have reported to you many problems and will continue to do so N!tmod will better and more stable. I like this mod and appreciate your arrangement.

What struck me:

Team members can disable tripmines by other team members. Why?
I have set g_friendlyFire 171, add all this value:

1 : Enable friendly fire
2 : Friendly fire does only half damage to teammates
8 : Friendly fires affects movers (tanks, trucks, etc)
32 : Landmines cannot be tripped by teammates
128 : Teammates don't activate tripmines - New since 2.2

And:

Lying players can hit very badly if :

g_realbody =1
g_realhead = 1
g_hitboxes =  9

Many players recognize this and exploit it.
Could not set for lying player
g_realhead and g_realbody
automatically to 0?

And:

n_proneDelay customize the prone and standup freely definable (e.g. 3 seconds or higher, better free available time per prone and per standup)?

Thx and greetings

OldMan

Offline

#8 11-Oct-12 04:15:49

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,098

Re: [FIXED] - Limited poison syringe

It can't work with LUA either because the values are hardcoded, it will work with LUA and/or weaponscripts in 2.2.1 smile

For the rest of your problems/requests, i'll check this tomorrow or when i get some free time, it's 4.10am and i really need to get some sleep... lol

P.S.: g_hitboxes flag 8, it was introduced for testing purposes, you should simply use g_hitboxes 1, or use basic hitboxes if problems persists.


iluvnitmod.png

Offline

#9 11-Oct-12 04:24:05

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,098

Re: [FIXED] - Limited poison syringe

Oh, just thought about it, g_realbody and g_realhead have NO effect if g_hitboxes is enabled


iluvnitmod.png

Offline

#10 11-Oct-12 19:06:22

OldMan
BETA Tester
Registered: 23-Sep-10
Posts: 103

Re: [FIXED] - Limited poison syringe

It can't work with LUA either because the values are hardcoded, it will work with LUA and/or weaponscripts in 2.2.1 smile
.

#

smile yes that is logically

P.S.: g_hitboxes flag 8, it was introduced for testing purposes, you should simply use g_hitboxes 1, or use basic hitboxes if problems persists.

#

g_hitboxes flag 9 is default value in nitmod 2.2

I find the setting "g_hitboxes 9" very good and would like to keep this setting. I hope you find a solution.

Offline

#11 12-Oct-12 22:57:45

OldMan
BETA Tester
Registered: 23-Sep-10
Posts: 103

Re: [FIXED] - Limited poison syringe

N!trox* wrote:

Regarding the issue with weapon scripts, i think i found what's wrong, some values are still hardcoded in the code and ignore weaponscripts values. I'll try to fix them for 2.2.1 smile

Is this also the reason for the rifle nade bug?

Offline

#12 13-Oct-12 08:59:23

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,098

Re: [FIXED] - Limited poison syringe

What's the rifle nade bug? With weaponscripts?
Rifle grenade is an explosive weapon and uses" splashdamage" value instead of "damage", maybe that's the reason.


iluvnitmod.png

Offline

#13 14-Oct-12 23:21:30

OldMan
BETA Tester
Registered: 23-Sep-10
Posts: 103

Re: [FIXED] - Limited poison syringe

Offline

#14 14-Oct-12 23:56:30

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,098

Re: [FIXED] - Limited poison syringe

Not related


iluvnitmod.png

Offline

Board footer

Powered by FluxBB