AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Plugin Menu M. (https://forums.alliedmods.net/showthread.php?t=297858)

Raul3w 05-25-2017 15:24

Plugin Menu M.
 
Hello everyone.
I want a menu for base builder mode 6.5 en 1.6.
This menu contains:
1.Weapon Menu
2.Zombie Class
3.Human Class
4.Shop
5.Respawn
6.Vip Menu
7.Knife Skin Menu
8.Ak47 Skin Menu.
Command:
1./guns
2./class
3./race
4./shop
5./revive
6./vmenu
7./knife
8./ak47
BB.Ecila.Ro menu appears
Hope to make this menu please.
I did one but it's not good
Quote:

#include <amxmodx>

#define PLUGIN "Meniu BB"
#define VERSION "1.0"
#define AUTHOR "Raul3w"

public plugin_init() {

register_clcmd("menu", "cmdMenu", ADMIN_ALL);
register_plugin(PLUGIN, VERSION, AUTHOR);
}

public cmdMenu(id) {
new i_Menu = menu_create("\rServer Menu", "menu_handler");
menu_additem(i_Menu, "\wMeniu Arme \rOnly Human", "1", 0);
menu_additem(i_Menu, "\wZombie Class", "2", 0);
menu_additem(i_Menu, "\wHuman Class \rOnly CT", "3", 0);
menu_additem(i_Menu, "\wRespawn", "4", 0);
menu_additem(i_Menu, "\wShop", "5", 0);
menu_additem(i_Menu, "\wKnife \rMenu", "6", 0);
menu_additem(i_Menu, "\wAk47 \rMenu", "7", 0);
menu_additem(i_Menu, "\wVip \rMenu", "8", ADMIN_LEVEL_H);
menu_setprop(i_Menu, MPROP_NEXTNAME, "Next");
menu_setprop(i_Menu, MPROP_BACKNAME, "Back");
menu_setprop(i_Menu, MPROP_EXITNAME, "Exit");

menu_display(id, i_Menu, 0)
}

public client_authorized(id)
{
client_cmd(id, "bind ^"M^" ^"menu^"")
}

public menu_handler(id, menu, item) {
if( item < 0 ) return PLUGIN_CONTINUE;
new cmd[3], access, callback;
menu_item_getinfo(menu, item, access, cmd,2,_,_, callback);
new Choise = str_to_num(cmd)
switch (Choise) {
case 1: {
client_cmd(id, "say /guns")
}
case 2: {
client_cmd(id, "say /class")
}
case 3: {
client_cmd(id, "say /race")
}
case 4: {
client_cmd(id, "say /revive")
}
case 5: {
client_cmd(id, "say /shop")
}
case 6: {
client_cmd(id, "say /knife")
}
case 7: {
client_cmd(id, "say /ak47")
}
case 8: {
client_cmd(id, "say /vmenu")
}
}
return PLUGIN_HANDLED;
}

OciXCrom 05-25-2017 16:34

Re: Plugin Menu M.
 
https://forums.alliedmods.net/showthread.php?t=284324

Raul3w 05-26-2017 10:14

Re: Plugin Menu M.
 
Problem server
[SVC_STUFFTEXT] Server tried to send invalid command:error say /

OciXCrom 05-26-2017 16:28

Re: Plugin Menu M.
 
The problem is in your game, not in the server. If you blocked those commands no plugin will be able to execute them.

Raul3w 05-28-2017 04:04

Re: Plugin Menu M.
 
help me give me cs 1.6 no sistem guard

shehzad1234 05-28-2017 05:37

Re: Plugin Menu M.
 
try this :-

PHP Code:

#include <amxmodx>

#define PLUGIN "Meniu BB"
#define VERSION "1.0"
#define AUTHOR "Raul3w"

public plugin_init() {

register_clcmd("chooseteam""cmdMenu");
register_plugin(PLUGINVERSIONAUTHOR);
}

public 
cmdMenu(id) {
new 
i_Menu menu_create("\rServer Menu""menu_handler");
menu_additem(i_Menu"\wMeniu Arme \rOnly Human""1"0);
menu_additem(i_Menu"\wZombie Class""2"0);
menu_additem(i_Menu"\wHuman Class \rOnly CT""3"0);
menu_additem(i_Menu"\wRespawn""4"0);
menu_additem(i_Menu"\wShop""5"0);
menu_additem(i_Menu"\wKnife \rMenu""6"0);
menu_additem(i_Menu"\wAk47 \rMenu""7"0);
menu_additem(i_Menu"\wVip \rMenu""8"ADMIN_LEVEL_H);
menu_setprop(i_MenuMPROP_NEXTNAME"Next");
menu_setprop(i_MenuMPROP_BACKNAME"Back");
menu_setprop(i_MenuMPROP_EXITNAME"Exit");

menu_display(idi_Menu0)
}

//public client_authorized(id)
//{
//client_cmd(id, "bind ^"M^" ^"menu^"")
//}

public menu_handler(idmenuitem) {
if( 
item ) return PLUGIN_CONTINUE;
new 
cmd[3], accesscallback;
menu_item_getinfo(menuitemaccesscmd,2,_,_callback);
new 
Choise str_to_num(cmd)
switch (
Choise) {
case 
1: {
client_cmd(id"say /guns")
}
case 
2: {
client_cmd(id"say /class")
}
case 
3: {
client_cmd(id"say /race")
}
case 
4: {
client_cmd(id"say /revive")
}
case 
5: {
client_cmd(id"say /shop")
}
case 
6: {
client_cmd(id"say /knife")
}
case 
7: {
client_cmd(id"say /ak47")

case 
8: {
client_cmd(id"say /vmenu")

}
return 
PLUGIN_HANDLED;



Raul3w 05-28-2017 07:04

Re: Plugin Menu M.
 
[SVC_STUFFTEXT] Server tried to send invalid command: /knife
[SVC_STUFFTEXT] Server tried to send invalid command: /ak47
[SVC_STUFFTEXT] Server tried to send invalid command: /race
[SVC_STUFFTEXT] Server tried to send invalid command: /class
[SVC_STUFFTEXT] Server tried to send invalid command: /guns
[SVC_STUFFTEXT] Server tried to send invalid command: /gold
[SVC_STUFFTEXT] Server tried to send invalid command: /shop.
give me ak47 work commands.

Ayman Khaled 05-28-2017 07:12

Re: Plugin Menu M.
 
dude, the problem from your game not from the server.
i tried OciXCrom's one, it's works 100% without any problem.

Raul3w 05-28-2017 07:57

Re: Plugin Menu M.
 
im used OciXCrom's opinion,iti problem my cs?
Edit/Delete Message Reply With Quote Multi-Quote This Message Quick reply to this message #7
[SVC_STUFFTEXT] Server tried to send invalid command: /knife
[SVC_STUFFTEXT] Server tried to send invalid command: /ak47
[SVC_STUFFTEXT] Server tried to send invalid command: /race
[SVC_STUFFTEXT] Server tried to send invalid command: /class
[SVC_STUFFTEXT] Server tried to send invalid command: /guns
[SVC_STUFFTEXT] Server tried to send invalid command: /gold
[SVC_STUFFTEXT] Server tried to send invalid command: /shop.
help me.

OciXCrom 05-28-2017 09:26

Re: Plugin Menu M.
 
You can't fix this with a plugin.


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

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