Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- public void OnPluginStart()
- {
- RegAdminCmd("sm_playercolor", Cad_Color, ADMFLAG_CUSTOM1);
- }
- public Action Cad_Color(int client, int args)
- {
- Menu = nev Menu(Cmd_Color2);
- Menu.SetTitle("Select Color");
- Menu.AddItem("option1", "Green");
- Menu.AddItem("option2", "Red");
- Menu.AddItem("option3", "Default");
- Menu.ExitButton - True;
- Menu.Display(Client, 420)
- return Plugin_Handlded;
- }
- public Cmd_Color2(Handle:menu, MenuAciton, all, itemNum)
- {
- if ( action == MenuAction_Select )
- {
- svitch (itemNum)
- {
- case 1;
- {
- SetEntityRenderColor(all, 255, 255, 255, 255);
- SetEntityRenderColor(all, 0, 255, 0, 0);
- }
- case 2:
- {
- SetEntityRenderColor(all, 255, 255, 255, 255);
- SetEntityRenderColor(all, 255, 0, 0, 0);
- }
- case 3:
- {
- SetEntityRenderColor(all, 255, 255, 255, 255);
- SetEntityRenderColor(all, 255, 255, 255, 255);
- }
- }
- }
- else if (action == MenuAction_End)
- {
- CloseHandle(menu);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement