oaaron99

Untitled

Feb 3rd, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3.  
  4. public OnPluginStart()
  5. {
  6. RegConsoleCmd("sm_button", CMD_Button);
  7. }
  8.  
  9. public Action CMD_Button(int client, int args)
  10. {
  11. char curMap[64];
  12. GetCurrentMap(curMap, sizeof(curMap));
  13.  
  14. if (!StrEqual(curMap, "jb_clouds_beta01"))
  15. return Plugin_Handled;
  16.  
  17. int iEnt = -1;
  18. char sName[64];
  19.  
  20. while((iEnt = FindEntityByClassname(iEnt, "func_button")) > 0)
  21. {
  22. GetEntPropString(iEnt, Prop_Data, "m_iName", sName, sizeof(sName));
  23.  
  24. if (StrEqual(sName, "secret_master_button_final"))
  25. {
  26. PrintToChatAll("Correct button (%i - %s)", iEnt, sName);
  27. AcceptEntityInput(iEnt, "Press", -1, -1);
  28. }
  29. }
  30.  
  31. return Plugin_Handled;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment