AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Clear Menus v0.4 (https://forums.alliedmods.net/showthread.php?t=24618)

karlos 02-27-2006 11:34

Clear Menus v0.4
 
1 Attachment(s)
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

VEN 02-27-2006 11:46

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.

karlos 02-27-2006 12:09

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 )

omghax 02-28-2006 11:17

nice

diamond-optic 02-28-2006 13:12

i have both engine and fakemeta running.. is it better to use one method over the other for this....

karlos 02-28-2006 13:25

no both are the same
just added this feature for people who are running only one of these modules

watch 02-28-2006 21:06

good job, that bug is really annoying


All times are GMT -4. The time now is 18:49.

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