Raised This Month: $319 Target: $400
 79%   Almost there!

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


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

So, last time a did use Weaponmod by Devcones
I has test 1.0 Omega and 1.2 Alpha versions again, and I did found some troubles.

As somebody know extra weapon default slot and replace is KNIFE\SPADE and that is why You should not see a crosshair.
So I did open
dod\addons\amxmodx\scripting\gameinfo\wpn_gam einfo_dod.sma
and customize this look an WEAPON_INDEX now is {4,3}
4 = Luger
3 = Colt

Code:
new const WEAPON_INDEX[MAX_WEAPONS] = {4, 3}			// Weapon Index of the weapon that should be replaced
new const Float:WEAPON_RUN_SPEED[MAX_WEAPONS] = {600.0, 600.0}		// Run speed of the replaced weapon
new const WEAPON_COMMAND[MAX_WEAPONS][] = {"weapon_spade", "weapon_amerknife"}	// Command to take the weapon
new const WEAPON_V_MODEL[MAX_WEAPONS][] = {"models/v_spade.mdl", "models/v_amerk.mdl"}		// Viewmodel of the weapon that should be replaced
new const WEAPON_P_MODEL[MAX_WEAPONS][] = {"models/p_spade.mdl", "models/p_amerk.mdl"}
Besides custimize weapon_spade and amerkinfe now my extra weapon on 2nd slot , by replacig Luger\Colt and I have crosshair.
version 1.2 Alpha Weapon by Devocnes has fix reloading animation.

And when I use my weapon in PISTOL SLOT my player animation works like with pistols.
Of course looks strange when player holding rifle like a pistol , but its better than holding rifle like spade )

But ! If I use INDEX of GARAND or M98k or another PRIMARY guns , its not working .. plugin don't gives me an extra gun.
So of course 1.2 is better,

HUD ammo clip and gun icon still not works
Dropped gun W_models liegen(deutch) on +50units above ground


So .. Who knows how fix ? :
HUD updates
Primary reassing

______________ update:
dod\addons\amxmodx\scripting\gameinfo\wpn_gam einfo_dod.sma
Code:
new g_msgCurWeapon   \\ uncomment this! (the vaskov)
new g_msgAmmoX          \\ uncomment this! (the vaskov)

	// User Messages  70 71 strokes  undcomment this! VSKV
	g_msgCurWeapon = get_user_msgid("CurWeapon")
	g_msgAmmoX = get_user_msgid("AmmoX")

// find STROKE 193 it must be:
// copy and replace
// -----------------------

// This function is used to update the players Ammo displayed on HUD
public wpn_gi_update_ammo(id, actWeapon, pAmmo, sAmmo)
{
	if(actWeapon = 1) {	// -1 would be no special weapon
		// Primary Ammo
		message_begin(MSG_ONE, g_msgCurWeapon, {0, 0, 0}, id)
		write_byte(1)
		write_byte(22)
		write_byte(pAmmo)
		message_end()
			
		// Secondary Ammo
		message_begin(MSG_ONE, g_msgAmmoX, {0, 0, 0}, id)
		write_byte(3)
		write_byte(sAmmo)
		message_end()
		
		return PLUGIN_CONTINUE
	}
	
	// Hide Ammo from HUD since user is using the knife
	message_begin(MSG_ONE, g_msgCurWeapon, {0, 0, 0}, id)
	write_byte(0)
	write_byte(1)
	write_byte(0)
	message_end()
	
	return PLUGIN_CONTINUE
}

I got "actWeapon" from this sma file and look and primary ammo BYTE 22
so 20 is m1carbine 21 - mg34 , 22- greese gun (id DODW_)
and now I did activate HUD CLIP , but It shows me Half of MAXCLIP and when my clip is empty before reloading eit shows me HALFofMAXCLIP -2 shoots.))

... still working about this

Last edited by TheVaskov; 10-09-2021 at 12:11.
TheVaskov is offline
TheVaskov
Junior Member
Join Date: Sep 2021
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(
64: VoiceMask IDLE
65: ReqState IDLE
66: CurWeapon IDLE
67: Health IDLE
68: HudText IDLE
69: SayText IDLE
70: TextMsg IDLE
71: WeaponList IDLE
72: ResetHUD IDLE
73: InitHUD IDLE
74: DeathMsg IDLE
75: ScoreInfo IDLE
76: GameRules IDLE
77: ResetSens IDLE
78: TeamScore IDLE
79: MOTD IDLE
80: ServerName IDLE
81: AmmoPickup IDLE
82: WeapPickup IDLE
83: HideWeapon IDLE
84: SetFOV IDLE
85: ScreenShake IDLE
86: ScreenFade IDLE
87: AmmoX IDLE
88: AmmoShort IDLE
89: BloodPuff IDLE
90: VGUIMenu IDLE
91: Spectator IDLE
92: WaveTime IDLE
93: WaveStatus IDLE
94: Scope IDLE
95: Object IDLE
96: CameraView IDLE
96: CameraView IDLE
97: InitObj IDLE
98: SetObj IDLE
99: StartProg IDLE
100: StartProgF IDLE
101: ProgUpdate IDLE
102: CancelProg IDLE
103: TimerStatus IDLE
104: HLTV IDLE
105: ClientAreas IDLE

106: PlayersIn IDLE
107: StatusValue IDLE
108: ClanTimer IDLE
109: MapMarker IDLE
110: ShowMenu IDLE
111: Frags IDLE
112: PStatus IDLE
113: ScoreShort IDLE
114: PClass IDLE
115: PTeam IDLE

116: YouDied IDLE
117: PShoot IDLE
118: Weather IDLE
119: ObjScore IDLE
120: ReloadDone IDLE
121: RoundState IDLE
122: UseSound LOGGING
123: CapMsg IDLE
124: HandSignal IDLE
125: CurMarker IDLE
125: CurMarker IDLE
126: ClCorpse IDLE
127: TimeLeft IDLE


Some not using in DOD.
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:39.


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