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

End of vote callback ? Hook check ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Furchee
Member
Join Date: Aug 2010
Old 11-23-2016 , 22:52   End of vote callback ? Hook check ?
Reply With Quote #1

Hi!

So I think is pretty much self explanatory (read the code!).
What I would LIKE to do is for the plugin to have a callback for when the vote map (or any vote I suppose) is ENDED and then run what "Timer_UnMute" is doing.

If the above doesn't exist -- the end of vote call/check (I couldn't really figure out how to make it look for the ending of a vote, even when looking through the API) we could always use some other method involving checking whether a hook was placed on round start, if it was, to remove it otherwise to plugin_continue so I don't get errors in my logs.

Any suggestions are welcome and I would request the reply to be a code snippet rather than linking to the API. I am currently unsure how I would use the vote calls or checks to do this which is why I'm asking you lovely bunch!

Thanks!

Spoiler

Last edited by Furchee; 11-23-2016 at 22:57.
Furchee is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 11-23-2016 , 23:29   Re: End of vote callback ? Hook check ?
Reply With Quote #2

use https://forums.alliedmods.net/showth...56974?t=156974
__________________
8guawong is offline
Furchee
Member
Join Date: Aug 2010
Old 11-23-2016 , 23:39   Re: End of vote callback ? Hook check ?
Reply With Quote #3

Quote:
Originally Posted by 8guawong View Post
I tried using his OnMapVoteEnd() but I couldn't get it to work (with the include file too, of course).

Last edited by Furchee; 11-23-2016 at 23:49.
Furchee is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 11-24-2016 , 07:43   Re: End of vote callback ? Hook check ?
Reply With Quote #4

you are probably doing something wrong then...
__________________
8guawong is offline
Furchee
Member
Join Date: Aug 2010
Old 11-24-2016 , 07:58   Re: End of vote callback ? Hook check ?
Reply With Quote #5

Quote:
Originally Posted by 8guawong View Post
you are probably doing something wrong then...
Would you be so kind as to give me an example of code so I could see whether I did it correctly ?
Furchee is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 11-24-2016 , 21:50   Re: End of vote callback ? Hook check ?
Reply With Quote #6

Quote:
Originally Posted by Furchee View Post
Would you be so kind as to give me an example of code so I could see whether I did it correctly ?
please show what you have done so far
__________________
8guawong is offline
Furchee
Member
Join Date: Aug 2010
Old 11-24-2016 , 22:41   Re: End of vote callback ? Hook check ?
Reply With Quote #7

Quote:
Originally Posted by 8guawong View Post
please show what you have done so far
Are you serious ?
It's in the first post.

Last edited by Furchee; 11-24-2016 at 23:06.
Furchee is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 11-25-2016 , 11:58   Re: End of vote callback ? Hook check ?
Reply With Quote #8

PHP Code:
#include <mapchooser_extended>

public OnMapVoteStart()
{
    
PrintToChatAll("vote started!");
}

public 
OnMapVoteEnd(const String:map[])
{
    
PrintToChatAll("vote ended");

you can do that first
__________________

Last edited by 8guawong; 11-25-2016 at 12:00.
8guawong is offline
Furchee
Member
Join Date: Aug 2010
Old 12-09-2016 , 22:57   Re: End of vote callback ? Hook check ?
Reply With Quote #9

Quote:
Originally Posted by 8guawong View Post
PHP Code:
#include <mapchooser_extended>

public OnMapVoteStart()
{
    
PrintToChatAll("vote started!");
}

public 
OnMapVoteEnd(const String:map[])
{
    
PrintToChatAll("vote ended");

you can do that first
Done.
Didn't work.
The server returned nothing in chat just as I thought it would.

Last edited by Furchee; 12-09-2016 at 22:57.
Furchee is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 12-10-2016 , 06:28   Re: End of vote callback ? Hook check ?
Reply With Quote #10

show us
sm plugins list
__________________

Last edited by 8guawong; 12-10-2016 at 06:28.
8guawong is offline
Reply



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 12:35.


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