AlliedModders

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

black-eye 05-11-2006 15:12

VGUI problem...
 
Hello...

I have a little problem with getting select team to work i VGUI menu...

I use this code:
Code:

register_menucmd(-2,(1<<0)|(1<<1),"team_select")  // VGUI menu
It was one i found in here, but i cant get it to work...

Any one who can tell me how to get it to work correct?

v3x 05-11-2006 15:14

  • 1. Use [small] tags.
    2. Post the full code that you're using.

black-eye 05-11-2006 15:28

Code:

#include <amxmodx>
public plugin_init()
{
register_menucmd(-2,(1<<0)|(1<<1),"team_select")  // VGUI menu 
}


public team_select(id, key)
{
client_print(0, print_chat, "team_select: %s, %f, %i, %d ", key, key, key, key)
}

I this what you want?

SweatyBanana 05-11-2006 16:04

He still wants it in small tags like this:

Code:
#include <amxmodx> public plugin_init() { register_menucmd(-2,(1<<0)|(1<<1),"team_select")   // VGUI menu } public team_select(id, key) { client_print(0, print_chat, "team_select: %s, %f, %i, %d ", key, key, key, key) }

p3tsin 05-11-2006 16:24

try printing it to console?
i think chat messages are ignored if u have a window open (motd.. vgui menu?), just a thought :)

v3x 05-11-2006 18:44

By the way, the key is going to be an integer. So use either %d or %i, not the other ones.

black-eye 05-12-2006 04:18

Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_menucmd(-2,1023,"team_select")   // VGUI menu } public team_select(id, key) {     server_print("team_select: %i, %d ", key, key) }
Hmmm i still dont get anything...


All times are GMT -4. The time now is 05:08.

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