Thread: [Solved] AddCommandListener broken?
View Single Post
Nekoz
Member
Join Date: Oct 2016
Old 07-24-2017 , 19:28   Re: AddCommandListener broken?
Reply With Quote #9

I did some PrintToChat
It seem like it overlap on each other
When a vote start, it start 2 votes in the background instead of 1
The plugin only pick up the first vote with empty arguments so the original vote continue with the 2nd one
I'm not sure why it happen...

EDIT: I just do a simple PrintToChat on that command

PHP Code:
public OnPluginStart()
{
    
AddCommandListener(callvoteListener"callvote");
}

public 
Action:callvoteListener(client, const String:cmd[], argc)
{
    
PrintToChat(client"Testing");
    return 
Plugin_Continue;

That callvote fire twice after map change... when I only callvote 1 time. Unless i reload the plugin. But when map change again, it fire twice again.
I'm not sure why AddCommandListener is like that
So instead of hooking the cvar, it actually create an alternative one?


EDIT 2: Just feel stupid LOL... It was actually sourcemod version causing it...
Now it working

Last edited by Nekoz; 07-24-2017 at 21:04.
Nekoz is offline