AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   hook ReloadEffect csgo not work (https://forums.alliedmods.net/showthread.php?t=311376)

client21 10-15-2018 05:14

hook ReloadEffect csgo not work
 
Why not working in csgo?

PHP Code:

public OnPluginStart()
{
    new 
UserMsg:id GetUserMessageId("ReloadEffect");
    if (
id == INVALID_MESSAGE_IDSetFailState("INVALID_MESSAGE_ID");
    
HookUserMessage(idfunc);
}

public 
Action:func(UserMsg:MsgIdHandle:hBitBuffer, const iPlayers[], iNumPlayersbool:bReliablebool:bInit)
{
    
LogError("Why not work?");
    return 
Plugin_Continue;



eyal282 10-15-2018 05:24

Re: hook ReloadEffect csgo not work
 
Quote:

Originally Posted by client21 (Post 2619797)
Why not working in csgo?

PHP Code:

public OnPluginStart()
{
    new 
UserMsg:id GetUserMessageId("ReloadEffect");
    if (
id == INVALID_MESSAGE_IDSetFailState("INVALID_MESSAGE_ID");
    
HookUserMessage(idfunc);
}

public 
Action:func(UserMsg:MsgIdHandle:hBitBuffer, const iPlayers[], iNumPlayersbool:bReliablebool:bInit)
{
    
LogError("Why not work?");
    return 
Plugin_Continue;



Does it print Why not work? Because it should if it works.

client21 10-15-2018 05:36

Re: hook ReloadEffect csgo not work
 
Obviously it does not print. That's why I ask.
I know that he should, but he even does not write this message to the log.

eyal282 10-15-2018 05:45

Re: hook ReloadEffect csgo not work
 
Quote:

Originally Posted by client21 (Post 2619797)
Why not working in csgo?

PHP Code:

public OnPluginStart()
{
    new 
UserMsg:id GetUserMessageId("ReloadEffect");
    if (
id == INVALID_MESSAGE_IDSetFailState("INVALID_MESSAGE_ID");
    
HookUserMessage(idfunc);
}

public 
Action:func(UserMsg:MsgIdHandle:hBitBuffer, const iPlayers[], iNumPlayersbool:bReliablebool:bInit)
{
    
LogError("Why not work?");
    return 
Plugin_Continue;



Quote:

Originally Posted by client21 (Post 2619800)
Obviously it does not print. That's why I ask.
I know that he should, but he even does not write this message to the log.

SetFailState?

client21 10-15-2018 06:06

Re: hook ReloadEffect csgo not work
 
Quote:

Originally Posted by eyal282 (Post 2619802)
SetFailState?

No, hook work, but CallBack not work.

eyal282 10-15-2018 06:14

Re: hook ReloadEffect csgo not work
 
Quote:

Originally Posted by client21 (Post 2619803)
No, hook work, but CallBack not work.

Impossible. Try requestframe combined with printtochatall.

Neuro Toxin 10-15-2018 06:16

Re: hook ReloadEffect csgo not work
 
Quote:

Originally Posted by eyal282 (Post 2619804)
Impossible. Try requestframe combined with printtochatall.

Not impossible. Rather than implying OP is doing it wrong try do it urself.

eyal282 10-15-2018 06:23

Re: hook ReloadEffect csgo not work
 
Quote:

Originally Posted by Neuro Toxin (Post 2619805)
Not impossible. Rather than implying OP is doing it wrong try do it urself.

Can't for the next 3 hours and I suspect I know the issue. In the past I had a bug of permissions which blocked error logging. He should try it out because it looks like something doesn't add up since either SetFailState or logerror should appear, not none

client21 10-15-2018 06:29

Re: hook ReloadEffect csgo not work
 
sm plugins load b
plugin work
[SM] Loaded plugin b.smx successfully.

sm plugins list
[SM] Listing 1 plugins:
01 "b.smx"

PHP Code:

public OnPluginStart()
{
    new 
UserMsg:id GetUserMessageId("ReloadEffect");
    if (
id == INVALID_MESSAGE_IDSetFailState("INVALID_MESSAGE_ID");
    
HookUserMessage(idfunc);        // if this hook fail, idk, my log empty
    
PrintToServer("plugin work");    // yes, he work
}

public 
Action:func(UserMsg:MsgIdHandle:hBitBuffer, const iPlayers[], iNumPlayersbool:bReliablebool:bInit)
{
    
CreateTimer(0.1why_TIMER_FLAG_NO_MAPCHANGE);
    
LogError("Why i not see this message?");
    return 
Plugin_Continue;
}

public 
Action:why(Handle:timer)
{
    
LogError("Why i not see this message?");
    
PrintToChatAll("Why i not see this message?");
    return 
Plugin_Stop;


My chat and log empty!

fragnichtnach 10-18-2018 01:23

Re: hook ReloadEffect csgo not work
 
Have you found a solution?


All times are GMT -4. The time now is 09:32.

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