Raised This Month: $12 Target: $400
 3% 

[ H3LP ] Weapons events?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-14-2018 , 10:03   [ H3LP ] Weapons events?
Reply With Quote #1

Hello, I have some doubts related to weapons events (ak47.sc, m3.sc, m4a1.sc, etc).

1. How to the code works with these event files? Because I've taken a look and the file is empty.
2. I can precache and emulate custom weapon events?
3. Why in amxmodx 1.8.3 the precache_event() output log error saying "This function doesn't exists"?
__________________









Last edited by CrazY.; 07-14-2018 at 10:06.
CrazY. is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-14-2018 , 10:11   Re: [ H3LP ] Weapons events?
Reply With Quote #2

Quote:
Originally Posted by CrazY. View Post
3. Why in amxmodx 1.8.3 the precache_event() output log error saying "This function doesn't exists"?
Provide the full unedited error session and the code (compilable and runnable please) that produces it.
Also your "amxx version".
__________________

Last edited by klippy; 07-14-2018 at 10:11.
klippy is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-14-2018 , 10:17   Re: [ H3LP ] Weapons events?
Reply With Quote #3

Custom weapon events is useless
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-14-2018 , 10:21   Re: [ H3LP ] Weapons events?
Reply With Quote #4

Code:
AMX Mod X 1.8.3-dev+5154 (http://www.amxmodx.org)
Authors:
	David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
	Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
	Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
	Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Mar 11 2018 07:25:29
Built from: https://github.com/alliedmodders/amxmodx/commit/2559fcf0
Build ID: 5154:2559fcf0
Core mode: JIT+ASM32
The code was fully developed with Reapi and as far I know it's not supported here. Anyway, here is the precache and emulate.

Spoiler


Spoiler


Code:
L 07/14/2018 - 11:21:16: [AMXX] Plugin "avp_shotgun.amxx" failed to load: Plugin uses an unknown function (name "precache_event") - check your modules.ini.
@Ghosted, why?
__________________









Last edited by CrazY.; 07-14-2018 at 10:22.
CrazY. is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-14-2018 , 11:29   Re: [ H3LP ] Weapons events?
Reply With Quote #5

Maybe related to this: https://github.com/alliedmodders/amxmodx/pull/490
Update to latest version.
__________________

Last edited by HamletEagle; 07-14-2018 at 11:29.
HamletEagle is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-14-2018 , 11:47   Re: [ H3LP ] Weapons events?
Reply With Quote #6

Anyway didn't work as an I expect. As an @ghosted said, custom events is useless.
__________________








CrazY. is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-14-2018 , 12:12   Re: [ H3LP ] Weapons events?
Reply With Quote #7

As half life source code says client hooks its original events (pfnHookEvent) and after event is alerted by server, it calls event function which does such things like place decal, update crosshair, make smokepuff, emit weapon sound...
And half life source code is similar to CS one.
Anyway my CSWM mod is bad? criticize it please.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-14-2018 at 12:17.
Ghosted is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-14-2018 , 12:42   Re: [ H3LP ] Weapons events?
Reply With Quote #8

I'm getting problem with M3 event. I've removed client prediction to emit custom fire sounds. With reapi I can emulate fire bullets (same of half-life source code). It don't work (decals, smoke, etc) if I don't call playback event too, but when I do that, default fire sound of M3 is being emited even if the prediction is removed.

The code was tested with other weapons (p228 and ak47) and it's working fine.
__________________









Last edited by CrazY.; 07-14-2018 at 12:43.
CrazY. is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-14-2018 , 12:46   Re: [ H3LP ] Weapons events?
Reply With Quote #9

Quote:
Originally Posted by CrazY. View Post
I'm getting problem with M3 event. I've removed client prediction to emit custom fire sounds. With reapi I can emulate fire bullets (same of half-life source code). It don't work (decals, smoke, etc) if I don't call playback event too, but when I do that, default fire sound of M3 is being emited even if the prediction is removed.

The code was tested with other weapons (p228 and ak47) and it's working fine.
So you want to say that on p228 & ak47 you blocked sound but decals and other things have not blocked?
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-14-2018 , 12:47   Re: [ H3LP ] Weapons events?
Reply With Quote #10

Yes, that's exactly what I said. I can emulate original "bullet effects" but with custom fire sounds.
__________________








CrazY. 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 13:14.


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