Advertisement
Guest User

Untitled

a guest
May 26th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. #include <sourcemod>
  2. public Plugin:myinfo =
  3. {
  4. name = "menu",
  5. author = "Sqower",
  6. description = "menu",
  7. version = "1.0",
  8. url = "<- URL ->"
  9. }
  10. public void OnPluginStart()
  11. {
  12. RegConsoleCmd("menu", Menu_Test1);
  13. }
  14.  
  15. public int Menu_Pomocy(Menu menu, MenuAction action, int client, int itemNum)
  16. {
  17. if(action == MenuAction_Select)
  18. {
  19. char info[32];
  20. GetMenuItem(menu, itemNum, info, sizeof(info));
  21.  
  22. if (strcmp(info, "opcja6") == 0) {
  23. ClientCommand(client, "rpgmenu");
  24. }
  25. if (strcmp(info, "opcja5") == 0) {
  26. ClientCommand(client, "sm_store");
  27. }
  28. if (strcmp(info, "opcja4") == 0) {
  29. ClientCommand(client, "sm_stuck");
  30. }
  31. if (strcmp(info, "opcja3") == 0) {
  32. ClientCommand(client, "sm_guns");
  33. }
  34. if (strcmp(info, "opcja2") == 0) {
  35. ClientCommand(client, "sm_remove");
  36. }
  37. if (strcmp(info, "opcja1") == 0) {
  38. ClientCommand(client, "sm_props");
  39. }
  40. }
  41. }
  42.  
  43. public Action Menu_Test1(int client, int args)
  44. {
  45. Menu menu = new Menu(Menu_Pomocy);
  46. menu.SetTitle("Menu Serwera");
  47. menu.AddItem("opcja1", "Budowanie");
  48. menu.AddItem("opcja2", "Usuwanie");
  49. menu.AddItem("opcja4", "Stuck");
  50. menu.AddItem("opcja3", "Bronie");
  51. menu.AddItem("opcja5", "Sklep");
  52. menu.AddItem("opcja5", "RpgMenu");
  53. menu.ExitButton = true;
  54. menu.Display(client, 120);
  55.  
  56. return Plugin_Handled;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement