Raised This Month: $95 Target: $400
 23% 

Clear Menus v0.4


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   v3x (159)
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 02-27-2006 , 12:34   Clear Menus v0.4
Reply With Quote #1

Code:
/*
* This plugin removes all menus/votes a player has when joining (remaining from other servers)
*
* Author:
*	-> White Panther
*
* v0.3:
*	- initial release
*
* v0.4:
*	-added:
*		- define to either use engine or fakemeta
*	-changed:
*		- better client check if fully connected
*		- new method to close menu ( thx VEN )
*/

// change this to 1 when you want to use fakemeta module instead of engine module
#define USE_FAKEMETA	0

#include <amxmodx>
#if USE_FAKEMETA == 0
#include <engine>
#else
#include <fakemeta>
#endif
eg:
a player is on server A and a vote started but he has not voted but just disconnected
then when he joins server B or A he will see the vote again but the player cannot do anything until a new vote comes or until he restarts the game

so using this plugin players will not be disturbed by such DEAD votes
Attached Files
File Type: sma Get Plugin or Get Source (clear_menus.sma - 1431 views - 1.2 KB)
__________________
alias White Panther
karlos is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 02-27-2006 , 12:46  
Reply With Quote #2

Maybe just send "ShowMenu" message?
Code:
    message_begin(MSG_ONE, g_msg_menu, {0,0,0}, id)     write_short(0)     write_char(0)     write_byte(0)     write_string("")     message_end()
I use this method to close non-VGUI menu.

Also what the purpose of on ground check?
If you need that check anyway you can use fakemeta instead of engine.
VEN is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 02-27-2006 , 13:09  
Reply With Quote #3

onground check is to make sure that the player is fully connected
but i think i can be improved

i prefer engine as it is more often used

hmm yes, message sounds better


EDIT:

Update 0.4:

added:
- define to either use engine or fakemeta

changed:
- better client check if fully connected
- new method to close menu ( thx VEN )
__________________
alias White Panther
karlos is offline
omghax
Member
Join Date: Dec 2005
Location: eth0
Old 02-28-2006 , 12:17  
Reply With Quote #4

nice
__________________
Quote:
George Carlin: Reminds me of something my grandfather used to say. He used to say "I'm going upstairs and fuck your grandmother." Well, he was an honest guy, you know? He wasn't going to lie to a little kid.
omghax is offline
Send a message via AIM to omghax Send a message via MSN to omghax Send a message via Yahoo to omghax Send a message via Skype™ to omghax
diamond-optic
Veteran Member
Join Date: May 2005
Location: Upstate New York
Old 02-28-2006 , 14:12  
Reply With Quote #5

i have both engine and fakemeta running.. is it better to use one method over the other for this....
__________________
diamond-optic is offline
Send a message via AIM to diamond-optic
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 02-28-2006 , 14:25  
Reply With Quote #6

no both are the same
just added this feature for people who are running only one of these modules
__________________
alias White Panther
karlos is offline
watch
Senior Member
Join Date: Sep 2005
Old 02-28-2006 , 22:06  
Reply With Quote #7

good job, that bug is really annoying
__________________
Code:
#include <amusing_small_signiture>
watch 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 23:12.


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