Raised This Month: $ Target: $400
 0% 

How to show menu when respawn ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 07-01-2014 , 02:34   Re: How to show menu when respawn ?
Reply With Quote #1

ok

Last edited by Awesome_man; 11-07-2014 at 22:31.
Awesome_man is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-01-2014 , 03:00   Re: How to show menu when respawn ?
Reply With Quote #2

You sir need to learn how to learn on your own and then learn how to properly ask for help.

The first thing you do when you have a question: test it!
If it doesn't work then you need to explain what you did (requires posting the code) AND what you want it to do AND what it actually does.

I think Flicker and Yami have extremely valid points. If you are clearly not putting any effort into learning, we will be much less likely to provide you with help because we will know that it won't actually help you learn because you are not trying.

Since the first reply that you received was wrong (both in functionally and syntax), I will correct that now: engclient_cmd() bypasses AMX Mod X entirely, you should simply call the function directly.

Also, as an FYI, the "say" command is blocked by cl_filterstuffcmd so using client_cmd() is not an option.
__________________

Last edited by fysiks; 07-01-2014 at 03:39.
fysiks is offline
Porta0123
Member
Join Date: Apr 2014
Location: Spain
Old 06-30-2014 , 11:39   Re: How to show menu when respawn ?
Reply With Quote #3

i think Flick3rR mean this :

Code:
public plugin_precache() // or Plugin_init() { RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1) }   public fwHamPlayerSpawnPost(iPlayer) {         if (is_user_alive(iPlayer)) {                engclient_cmd(iPlayer, "say /menu")           } }

Last edited by Porta0123; 06-30-2014 at 11:43. Reason: id error :3
Porta0123 is offline
Old 06-30-2014, 11:42
Awesome_man
This message has been deleted by Awesome_man.
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 06-30-2014 , 11:44   Re: How to show menu when respawn ?
Reply With Quote #5

Please attach this in my code :\
Awesome_man is offline
Porta0123
Member
Join Date: Apr 2014
Location: Spain
Old 06-30-2014 , 11:47   Re: How to show menu when respawn ?
Reply With Quote #6

i cant read what you say but i mean this:

Code:
#include <amxmodx> #include <hamsandwich> #include <engine> enum _:gMenu {     NAME[32],     ACTION[32] }; new const gMenu_cmds[] [gMenu] = {     { "Get Help", "say /help" }   }; public plugin_init(){     register_plugin("","1.0","");     RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)     register_clcmd("say /menu","cmd_menu"); } public cmd_menu(client){     new m = menu_create("rYOUR MENU :-","mHandler");     for (new i; i < sizeof gMenu_cmds; i++)         menu_additem(m,gMenu_cmds[i][NAME]);     menu_display(client,m); } public mHandler(client,m,item){     if (item != MENU_EXIT)         client_cmd(client,"%s",gMenu_cmds[item][ACTION]);     menu_destroy(m); } public fwHamPlayerSpawnPost(iPlayer) {         if (is_user_alive(iPlayer))         {                engclient_cmd(iPlayer, "say /menu")           } }

i think this will works

Last edited by Porta0123; 06-30-2014 at 11:48. Reason: add this include too
Porta0123 is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-30-2014 , 12:37   Re: How to show menu when respawn ?
Reply With Quote #7

To the OP: I just want to say, that it's some kind of rediculous to call the code provided above "yours", since you can't understand where to put the command exectuting line. I don't know, you may call it "this code", or something else, but correct. It's about that the code is not yours. And it's strange to say it's yours, when you can't add this simple feature. I don't want to be that rough, how it sounds, but you just get funny like that. Nothing personal.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Old 07-01-2014, 03:09
JOE zhang
This message has been deleted by YamiKaitou. Reason: spam
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 21:14.


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