Raised This Month: $32 Target: $400
 8% 

[DOD] weapons, classes, teams Addon (request/solution)


Post New Thread Reply   
 
Thread Tools Display Modes
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 10-09-2021 , 10:54   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #11

Topic about hud_clip\ammo update

Nice solution here https://forums.alliedmods.net/showpo...&postcount=139
But it use only hud text message
Example

Last edited by TheVaskov; 01-23-2022 at 04:19.
TheVaskov is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 10-14-2021 , 03:51   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #12

here is
Day of Defeat get_user_msgid(
Example


Some not using in DOD.

Last edited by TheVaskov; 01-23-2022 at 04:15.
TheVaskov is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 01-23-2022 , 03:51   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #13

Now result of my progress:
Created:


Mortar for Weaponmod 1.2a by Devcones
Based on wpn_rocketlauncher.sma
Used DOD stock models, sprites, sounds.
Looks good with v_mortar animation
Cam fly with little random rotation
When shoots it get's bone of finger origin and assign Sparks. Lights, Smoke. 'cause we have problem #2
Problems:
#1 Can't use on server without my SVT40 maybe it use some functions together. So you must install wpn_mortar and wpn_svt40.
#2 No player animation - need to start body sequencer] for example #209 stand_piat_zoom or else.
Problem with player animation is very important in Weaponmod by Devcones, cause it's no works on every guns
#3 I use custom sparks, smoke, and flash light's cause with no player animation there is now shoot-event (or what I must to find for start?) - this is second or half of problem #2
#4 No standart Hud ammo update - I has found some thing on DOD plugins, so it can update clip ammo , but it based on true change of clip WEAPON which used like a swith base of Weaponmod By Devcones.
#5 registartion of kill if think it works not good like in game engine

https://youtu.be/98nXsit0y-s plese anjoy mortar video


AVT40 for Weaponmod 1.2a by Devcones
Nothing special now , just try to make a draft for some USSR and Japan Rifles
Have some brother's promblems like mortar : hud, playeranimation; #5 , need some better recoil fucnions



anti-personnel mine
For Set APmine press "E" (+Use) when looks on ground or wall closer than 150 units.
Works very simple , if you step on , you will die and who near explossion gets damage
You can see it on the radar cause it uses TNT model.

Problems:
Can't shoot and destroy APmine by shot.
I use array for assign Owner of Entity couse set_pev_owner not works
Set_pev_health destroy touch function.


https://youtu.be/ANbW8w8B-A4 - video mines and throw knifes


bonus at the end of video:
I has register bones oridgin and start sparks from them by using number of bone cycle.

Thanks to God and Diamon-Optic, I 've write a message for Diamon-Optic and he helps me to activate my account on dodplugins. I've been wait it from september 2021. As you know we have not a lot of plugins for dod , but we have a lot of people who try to hide sma. which thay doesn't made !
So let them taste some big on lips.

So next steps are:
create hostage woman to save her (like CS 1.6 standart map misson)
create USSR and Japan guns, and teams and else. I'm steel need for good rtv, timeleft and else plugins .
Please wellcome to my test server ____MORTARS (You can find it in Steam Internet server list )

So and the most popular problem my code needed to be optimized.


here is USSR soldier in future...
ATTENTION to Use some files on server look at PRECACHE LIST and create some sounds,and folders with models.
Attached Thumbnails
Click image for larger version

Name:	2022-01-23_11-40-48.png
Views:	132
Size:	66.2 KB
ID:	193275  
Attached Files
File Type: sma Get Plugin or Get Source (wpn_dod_mortar_a.sma - 102 views - 13.2 KB)
File Type: sma Get Plugin or Get Source (wpn_dod_svt40.sma - 106 views - 32.4 KB)
File Type: zip v_svt40beta.zip (240.1 KB, 80 views)
File Type: sma Get Plugin or Get Source (dod_antitroopmine.sma - 137 views - 9.1 KB)

Last edited by TheVaskov; 04-10-2022 at 11:01.
TheVaskov is offline
Old 01-23-2022, 04:22
TheVaskov
This message has been deleted by TheVaskov. Reason: don't need to be
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 04-10-2022 , 10:59   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #14

DOD Throw Knife to Weaponbox
VERSION "1.8"
AUTHOR "[America][TheVaskov]"
https://forums.alliedmods.net/showthread.php?t=337380




Description

Press the +attack2 (right mouse button) to throw a knife or a spade and kill the enemy

This code is a plugin for the Day of Defeat game in amxx 1.8.2 Goldsrc. It is designed to create effects and sounds when using the knife in the game. It also changes the weapon box model to match the knife being used. The code also handles collisions of the knife with players and other objects in the game, including breakable objects.
Attached Files
File Type: sma Get Plugin or Get Source (dod_throwknife_weaponbox_APR2023.sma - 70 views - 15.6 KB)

Last edited by TheVaskov; 04-23-2023 at 01:23.
TheVaskov is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 04-12-2022 , 12:59   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #15

How to remove weaponbox or dropped weapon
(sorry that I make this tutorial only in this topic, I just collect some for DOD, but this TUT can be usefull for CS 1.6, but I'm not sure)
this is just way , and maybe it can crush the server or some data.I did found new lessons , and need tu understand the way how it works
Same solution^ https://forums.alliedmods.net/showthread.php?t=49247


working plugin in attachment .
say parser and open console and you will collect info for entity by class and his owner.



I have read that:
- difficult to remove weapons from hands
- hard to remove weaponbox .
But I need to do this, so I started searching for a solution to this problem.
I found:
Thrown weapon on the ground. Who is its owner.
What is a weapon in the hands and what is a weapon on the ground.
I can change the amount of ammo in this weapon clip.
Perhaps I can do more.


1. Searching dropped weapon_kar
Code:
public func_FixMapGuns()
{		
	new ent = -1
	while((ent = find_ent_by_class(ent,"weapon_kar")) != 0) {

  ///  parse array 
  bx_owner = entity_get_edict2(ent, EV_ENT_owner )
}
This *while-cycle will find all the weapon_kar == in arms || on the ground || in inventory .
So time to: entity_get_string(ent, EV_SZ_targetname ...
So when we get entity owner , will found the weaponbox-pairs. Look at this table:

Code:
[S] id 37 clnm_ weapon_kar / glbnm_  / model_  / trg_  / tgnm_  
[S2] netname  / msg_  / bnx     / viewmdl  / wpndml  
[e] chain -1 dmginf -1 enemy -1 aiment 1 owner 1 groundentity -1 pContainingEntity 37 euser1 -1 euser2 -1 euser3 -1 euser4 -1
[i1]gamestate 0 oldbuttons 0 groupinfo 0 iuser1 0 iuser2 0 iuser3 0 iuser4 0
[i2]weaponanim 0 pushmsec 0 bInDuck 0 flTimeStepSound 0 flSwimTime 0 flDuckTime 0
[i3]iStepLeft 0 movetype 12 solid 0 skin 0 body 2 effects 128 light_level 0
[i4]sequence 0 gaitsequence 0 modelindex 0 playerclass 0 waterlevel 0 watertype 0 spawnflag 1073741824 flags 0
[i5]colormap 0 team 0 fixangle 0 weapons 0 rendermode 0 renderfx 0 button 0 impulse 0 deadflag 0
[S] id 1 clnm_ player / glbnm_  / model_ models/player.mdl / trg_  / tgnm_  
[S2] netname America / msg_  / bnx     / viewmdl models/v_98k.mdl / wpndml models/p_k98.mdl 
[e] chain -1 dmginf -1 enemy -1 aiment -1 owner -1 groundentity -1 pContainingEntity 1 euser1 -1 euser2 -1 euser3 -1 euser4 -1
[2i1]gamestate 0 oldbuttons 520 groupinfo 0 iuser1 0 iuser2 0 iuser3 0 iuser4 0
[2i2]weaponanim 3 pushmsec 0 bInDuck 0 flTimeStepSound 183 flSwimTime 0 flDuckTime 0
[2i3]iStepLeft 0 movetype 3 solid 3 skin 0 body 0 effects 0 light_level 50
[2i4]sequence 118 gaitsequence 11 modelindex 101 playerclass 10 waterlevel 0 watertype -1 spawnflag 0 flags 520
[2i5]colormap 1 team 2 fixangle 0 weapons 541712 rendermode 0 renderfx 0 button 520 impulse 0 deadflag 0
[S] id 38 clnm_ weapon_kar / glbnm_  / model_  / trg_  / tgnm_  
[S2] netname  / msg_  / bnx     / viewmdl  / wpndml  
[e] chain -1 dmginf -1 enemy -1 aiment 1 owner 44 groundentity -1 pContainingEntity 38 euser1 -1 euser2 -1 euser3 -1 euser4 -1
[i1]gamestate 0 oldbuttons 0 groupinfo 0 iuser1 0 iuser2 0 iuser3 0 iuser4 0
[i2]weaponanim 0 pushmsec 0 bInDuck 0 flTimeStepSound 0 flSwimTime 0 flDuckTime 0
[i3]iStepLeft 0 movetype 0 solid 0 skin 0 body 2 effects 128 light_level 0
[i4]sequence 0 gaitsequence 0 modelindex 0 playerclass 0 waterlevel 0 watertype 0 spawnflag 1073741824 flags 0
[i5]colormap 0 team 0 fixangle 0 weapons 0 rendermode 0 renderfx 0 button 0 impulse 0 deadflag 0
[S] id 44 clnm_ weaponbox / glbnm_  / model_ models/w_98k.mdl / trg_  / tgnm_  
[S2] netname  / msg_  / bnx     / viewmdl  / wpndml  
[e] chain -1 dmginf -1 enemy -1 aiment -1 owner 1 groundentity -1 pContainingEntity 44 euser1 -1 euser2 -1 euser3 -1 euser4 -1
[2i1]gamestate 0 oldbuttons 0 groupinfo 0 iuser1 0 iuser2 0 iuser3 0 iuser4 0
[2i2]weaponanim 0 pushmsec 0 bInDuck 0 flTimeStepSound 0 flSwimTime 0 flDuckTime 0
[2i3]iStepLeft 0 movetype 6 solid 1 skin 0 body 0 effects 0 light_level 0
[2i4]sequence 0 gaitsequence 0 modelindex 48 playerclass 0 waterlevel 0 watertype -1 spawnflag 0 flags 512
[2i5]colormap 0 team 0 fixangle 0 weapons 0 rendermode 0 renderfx 0 button 0 impulse 0 deadflag 0
Here is two weapon_kar on the map.
Red in my hand\inventory - because owner = 1 , 1 = player, netname = America
Blue is on the ground \ in weapon box - because owner is 44 = weaponbox . but weaponbox has true owner = America

as You see weapon_kar is nottoucheble entity , is another kind of entity.
w_model of weapon is only for weapon_box ..
p_model only for players ...
so models only for OWNERS of weapons.


Code:

bx_owner = entity_get_edict2(ent, EV_ENT_owner )
             entity_get_string(bx_owner, EV_SZ_classname , bxclassname, 63) // weaponbox
		
		if(equal(bxclassname, "weaponbox")){
			
			client_print(0,print_chat, "SET CLIP 222222222")
			set_pdata_int(ent,108,2,4)  
		
			// remove_entity(bx_owner)
		}
		
	}
Now I set clipammo only for weapon_kar on the ground ( owner = weaponbox )
or I can remove weaponbox from map.
done !!
Attached Files
File Type: sma Get Plugin or Get Source (dod_parse_ent.sma - 64 views - 13.5 KB)

Last edited by TheVaskov; 04-14-2022 at 17:26.
TheVaskov is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 04-27-2022 , 05:17   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #16

DOD Jagendog
VERSION 1.0
AUTHOR [America][TheVaskov]




Description

Demo Video https://youtu.be/ERR6T7d_4Q0

This plugin invites a hunting guard dog to the map, which executes your commands.

In fact, a dog is an entity with gravity, health, a model with animation and a point to follow.
Every n-seconds, the task of searching for an enemy in the radius (find_sphere_class) is performed, if an enemy is found, then this interrupts all other tasks and an attack is made.
After killing or on command, you can search for dropped weapons that the dog will bring you in his teeth.

Problems
Sometimes a dog, when running after a goal, rests against a wall like a stupid bot from some games. I have assigned a condition under which the dog makes a jump to overcome obstacles. and if it gets stuck, I set pulses that shift the dogs to the sides, in order to set curves in a straight line to the goal.

Idea
To exclude the animation and the procedure of the dog's death, I think that if someone kills the owner of the dog, then he becomes the new owner of enitity.

In the code, I tried to make a check: is the target visible to the dog through PVS. but it works somewhat according to a different detection algorithm, so I should use ray tracing and search for the target. Perhaps I will write a more serious solution for the pursuit and search for a goal, so that it would look even more realistic, but for this I still need more practice and code examples.

P.S

to fysiks Thanks a lot . Thank you for watching the code, yes, I still use someone else's work, and I assemble my plugins from such parts and paragraphs, adapting them to my ideas. Due to my little experience, I solve some logical problems in a very primitive way. I am always ready for suggestions , advice and collaboration
Attached Files
File Type: sma Get Plugin or Get Source (dod_jagendog.sma - 136 views - 18.7 KB)

Last edited by TheVaskov; 05-03-2022 at 14:01.
TheVaskov is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-27-2022 , 23:33   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #17

Very interesting. Looks like you've put a bunch of effort into these.

Just glancing at the code, I noticed that there is some bad indentation going on making it harder to read the code.
__________________

Last edited by fysiks; 04-27-2022 at 23:33.
fysiks is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 11-13-2022 , 12:41   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #18

This is just the beginning. I've gone from Weaponmod by DevconeS gained experience and come up with a more elegant solution, if I succeed, it can be prevented in one module. We will be able to use the available tools to hide the models in the submodel, so as not to run into the limiter of pre-cached files. and we will try to interfere less with the functions and laws of events in the game, so that we don’t have to emulate shots, tracing, death messages, and so on again.

VIDEO YOUTUBE

Short description:
The DOD_TEAMSETS plugin is designed to assign a variable to the player equal to his belonging to the country's troops: USSR, Japan, Italy, Germany, America, Britain.
Based on this variable, the model (skin or military uniform) of the player is assigned.
I write the variable to pev_groupinfo (natural number)
Also, based on the country and class of the player, when the player respawns, he is given the appropriate weapon (new)

Radio chat plugin: based on pev_groupinfo, starts a radio chat in the language of the troops (here you have to cache all the audio) The plugin will not work without a plugin for assigning commands.

Weapon plugins:
So far, these are separate plugins. they are based on the real one. changing the visual part: model, sound, ammo interface. shot speed
however, damage conditions and other features are available for editing. ,

I think that experienced guys will climb here, so my simple plugins do not need explanation.
you will see how I use hamsandwich to register attack, spawn, reload events.

Much later, I will improve this forum thread and post all my developments for this year. I have become more familiar with DOD, but many of my decisions are taken from other people's plugins. thanks everyone. who post their work.

Includes plugins and accompanying models, sounds.
Avt40 == https://en.wikipedia.org/wiki/SVT-40
pps43 == https://en.wikipedia.org/wiki/PPS_submachine_gun
tt33 == https://en.wikipedia.org/wiki/TT_pistol
Attached Files
File Type: sma Get Plugin or Get Source (dod_teamsets.sma - 83 views - 3.0 KB)
File Type: sma Get Plugin or Get Source (dod_teams_radio.sma - 81 views - 14.4 KB)
File Type: zip dod.zip (7.19 MB, 66 views)
File Type: sma Get Plugin or Get Source (dod_weaponmod_avt40.sma - 92 views - 12.3 KB)
File Type: sma Get Plugin or Get Source (dod_weaponmod_pps43.sma - 84 views - 12.2 KB)
File Type: sma Get Plugin or Get Source (dod_weaponmod_tt33.sma - 101 views - 12.4 KB)
__________________
TheVaskov is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 04-23-2023 , 01:32   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #19

This plugin activates the grenade as soon as you swing it, if you don't throw it away within two seconds, it will explode in your hands.
Attached Files
File Type: sma Get Plugin or Get Source (dod_nade_activator.sma - 60 views - 4.0 KB)
__________________
TheVaskov is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 04-23-2023 , 02:51   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #20

This plugin allows you to add a new weapon for the Day of Defeat Goldsrc (steam)
The system is based on standard weapons. We take the index of the essence of the weapon in your hands, and set the weapon code .
The technology by which I do this is spied on in the systems of ZombieMod CS 1.6, and KORD_172 Weaponmod and else plugins.
Code:
idx_wpn = Id in m_pActiveItem
entity_set_int(idx_wpn, EV_INT_iuser4, i)
Demo video in YouTube

After setting clip ammo, hud and models, start the registration of the Primary and Secondary attacks takes place, during which the substitution of the function takes place:
sound overlay (if available) / changing the attack speed
or if this is a special type of weapon that does not exist by default, then virtual functions are launched that simulate an attack in which you yourself prescribe a script.
An important feature of this option is reading parameters from a text file, which contains a list of weapons, their characteristics and everything that is needed is written to a multidimensional array with pointers. now we don't need to produce countless plugins, because here we can set a flexible configuration.

The special code is the line number in the text . this eliminates the iteration of the search for strings with matches of special code. because this is a direct link. so be careful.
the plugin already provides a system of submodels in advance, you can assign 1 model file and specify the submodel number in a text file, or use unique models. the plugin already works in two modes automatically.
Animations and sounds of the player will be used on the basis of standard weapons that you choose as a reference base. HUD cartridges of whatever you wish from the whole list. the rest is much broader. I repeat, or you specify a special type of weapon, but this can be provided with a special type of attack.In general, the plugin architecture is very similar to the weapons system in Quake 1.

Today, the plugin has a lot of holes and inaccuracies, and I need the help of experienced coders. I built the plugin on my knee, and every time I improve and optimize it, I would like feedback and help. we need to speed up some functions and data processing. Perhaps somewhere you should make additional checks and interrupt with a return
Attached Files
File Type: sma Get Plugin or Get Source (dod_weaponmod_ini.sma - 71 views - 30.7 KB)
File Type: ini w_weapons.ini (1.2 KB, 44 views)
__________________
TheVaskov is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode