AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [ H3LP ] Weapons events? (https://forums.alliedmods.net/showthread.php?t=309121)

CrazY. 07-14-2018 10:03

[ H3LP ] Weapons events?
 
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"?

klippy 07-14-2018 10:11

Re: [ H3LP ] Weapons events?
 
Quote:

Originally Posted by CrazY. (Post 2603535)
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".

Ghosted 07-14-2018 10:17

Re: [ H3LP ] Weapons events?
 
Custom weapon events is useless

CrazY. 07-14-2018 10:21

Re: [ H3LP ] Weapons events?
 
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?

HamletEagle 07-14-2018 11:29

Re: [ H3LP ] Weapons events?
 
Maybe related to this: https://github.com/alliedmodders/amxmodx/pull/490
Update to latest version.

CrazY. 07-14-2018 11:47

Re: [ H3LP ] Weapons events?
 
Anyway didn't work as an I expect. As an @ghosted said, custom events is useless.

Ghosted 07-14-2018 12:12

Re: [ H3LP ] Weapons events?
 
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.

CrazY. 07-14-2018 12:42

Re: [ H3LP ] Weapons events?
 
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.

Ghosted 07-14-2018 12:46

Re: [ H3LP ] Weapons events?
 
Quote:

Originally Posted by CrazY. (Post 2603588)
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?

CrazY. 07-14-2018 12:47

Re: [ H3LP ] Weapons events?
 
Yes, that's exactly what I said. I can emulate original "bullet effects" but with custom fire sounds.


All times are GMT -4. The time now is 00:53.

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