Advertisement
Guest User

Untitled

a guest
Jun 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3.  
  4. public void OnPluginStart()
  5. {
  6. RegAdminCmd("sm_playercolor", Cad_Color, ADMFLAG_CUSTOM1);
  7.  
  8. }
  9.  
  10.  
  11. public Action Cad_Color(int client, int args)
  12.  
  13. {
  14. Menu = nev Menu(Cmd_Color2);
  15. Menu.SetTitle("Select Color");
  16. Menu.AddItem("option1", "Green");
  17. Menu.AddItem("option2", "Red");
  18. Menu.AddItem("option3", "Default");
  19. Menu.ExitButton - True;
  20. Menu.Display(Client, 420)
  21.  
  22. return Plugin_Handlded;
  23. }
  24.  
  25. public Cmd_Color2(Handle:menu, MenuAciton, all, itemNum)
  26. {
  27. if ( action == MenuAction_Select )
  28. {
  29. svitch (itemNum)
  30. {
  31. case 1;
  32. {
  33. SetEntityRenderColor(all, 255, 255, 255, 255);
  34. SetEntityRenderColor(all, 0, 255, 0, 0);
  35. }
  36. case 2:
  37. {
  38. SetEntityRenderColor(all, 255, 255, 255, 255);
  39. SetEntityRenderColor(all, 255, 0, 0, 0);
  40. }
  41.  
  42. case 3:
  43. {
  44. SetEntityRenderColor(all, 255, 255, 255, 255);
  45. SetEntityRenderColor(all, 255, 255, 255, 255);
  46. }
  47. }
  48. }
  49. else if (action == MenuAction_End)
  50. {
  51. CloseHandle(menu);
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement