Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- public Plugin:myinfo =
- {
- name = "menu",
- author = "Sqower",
- description = "menu",
- version = "1.0",
- url = "<- URL ->"
- }
- public void OnPluginStart()
- {
- RegConsoleCmd("menu", Menu_Test1);
- }
- public int Menu_Pomocy(Menu menu, MenuAction action, int client, int itemNum)
- {
- if(action == MenuAction_Select)
- {
- char info[32];
- GetMenuItem(menu, itemNum, info, sizeof(info));
- if (strcmp(info, "opcja6") == 0) {
- ClientCommand(client, "rpgmenu");
- }
- if (strcmp(info, "opcja5") == 0) {
- ClientCommand(client, "sm_store");
- }
- if (strcmp(info, "opcja4") == 0) {
- ClientCommand(client, "sm_stuck");
- }
- if (strcmp(info, "opcja3") == 0) {
- ClientCommand(client, "sm_guns");
- }
- if (strcmp(info, "opcja2") == 0) {
- ClientCommand(client, "sm_remove");
- }
- if (strcmp(info, "opcja1") == 0) {
- ClientCommand(client, "sm_props");
- }
- }
- }
- public Action Menu_Test1(int client, int args)
- {
- Menu menu = new Menu(Menu_Pomocy);
- menu.SetTitle("Menu Serwera");
- menu.AddItem("opcja1", "Budowanie");
- menu.AddItem("opcja2", "Usuwanie");
- menu.AddItem("opcja4", "Stuck");
- menu.AddItem("opcja3", "Bronie");
- menu.AddItem("opcja5", "Sklep");
- menu.AddItem("opcja5", "RpgMenu");
- menu.ExitButton = true;
- menu.Display(client, 120);
- return Plugin_Handled;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement