AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu-Help (https://forums.alliedmods.net/showthread.php?t=210134)

lagayo 03-06-2013 18:45

Menu-Help
 
how do you get a menu appears automatly every rounds? whitout a player type any comand?

thank you.

YamiKaitou 03-06-2013 19:28

Re: Menu-Help
 
Detect round start and then display the menu. There are plenty of threads already that explain each of these 2 things separately, it isn't that hard to combine them.

Blizzard_87 03-06-2013 19:39

Re: Menu-Help
 
hook it to ham spawn function.

edit:

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "New Project"
#define VERSION "1.0"
#define AUTHOR "Blizzard"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""fwd_post_spawn"1);
    
}


public 
fwd_post_spawn(id)
{
    
some_menu_function(id// hook menu command here, this will show menu to player's every spawn.
    



fysiks 03-07-2013 02:09

Re: Menu-Help
 
Quote:

Originally Posted by Blizzard_87 (Post 1908045)
hook it to ham spawn function.

Just to clarify, the answer to the question is not "hook spawn". The correct answer is "hook new round". Huge difference (especially since you don't technically know what game s/he is playing). Search "new round" in the tutorials section.

Blizzard_87 03-07-2013 04:26

Re: Menu-Help
 
Quote:

Originally Posted by fysiks (Post 1908178)
Just to clarify, the answer to the question is not "hook spawn". The correct answer is "hook new round". Huge difference (especially since you don't technically know what game s/he is playing). Search "new round" in the tutorials section.

no worries my bad. want me to edit my post with the new round code?


All times are GMT -4. The time now is 21:44.

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