Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. new Handle:g_hClientShitPanels[MAXPLAYERS + 1];
  2. public Action:Command_MenuTest(client, args)
  3. {
  4. if(!IsClientInGame(client))
  5. return;
  6.  
  7. if(g_hClientShitPanels[client] != INVALID_HANDLE)
  8. delete g_hClientShitPanels[client];
  9.  
  10. new Handle:panel = CreatePanel();
  11. SetPanelTitle(panel, "Stupid Panel Title");
  12. for (new i = 0; i <= 512; i++)
  13. {
  14. if(!IsValidEntity(entArray[i][ent_entityid]))
  15. continue;
  16.  
  17. if(entArray[i][ent_ownerid] > 0 && entArray[i][ent_ownerid] <= MaxClients)
  18. {
  19. if(IsClientInGame(entArray[i][ent_ownerid]))
  20. {
  21. char sBuffer[512];
  22. Format(sBuffer, sizeof(sBuffer), "%s %N CoolDown: %i", entArray[i][ent_name], entArray[i][ent_ownerid], entArray[i][ent_cooldowntime]);
  23. DrawPanelText(panel, sBuffer);
  24. }
  25. }
  26. }
  27. g_hClientShitPanels[client] = panel;
  28. SendPanelToClient(panel, client, ShitPanelHandler, MENU_TIME_FOREVER);
  29. }
  30.  
  31. public int ShitPanelHandler(Handle:menu, MenuAction:action, client, choice)
  32. {
  33. if(action == MenuAction_Cancel)
  34. {
  35. g_hClientShitPanels[client] = INVALID_HANDLE;
  36. delete menu;
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement