Advertisement
Guest User

index.html

a guest
Feb 3rd, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. <center>
  2. <font face=Arial>
  3.  
  4. <body bgcolor="#6495ED"> </body>
  5.  
  6. <p>
  7. <font size = 6 color = YELLOW>
  8. Hook a Callback
  9. </font>
  10. </p>
  11.  
  12. Callback: <input id="ncb" size=36></input> (example = OnPlayerConnect)<br/>
  13. Params: <input id="pcb" size=36></input> (example = playerid)<br/>
  14. Prefix: <input id="prb" size=36></input> (example = pds)<br/>
  15. <button onClick="cc(1)">Proccess</button><br/>
  16.  
  17. <p><font size=6 color = YELLOW>Hook a Function</font><br/>
  18.  
  19. Fuction: <input id="nf" size=36></input> (example = GivePlayerMoney)<br/>
  20. Params: <input id="pf" size=36></input> (example = playerid, amount)<br/>
  21. Prefix: <input id="pr" size=36></input> (example = pds)<br/>
  22. <button onClick="cc(2)">Proccess</button>
  23.  
  24. <progress max="100" id="progress" style="display:none;"></progress>
  25.  
  26. <script>
  27. var count = 0;
  28.  
  29. function cc(id)
  30. {
  31. if(id == 1)
  32. {
  33. var c = document.getElementById("ncb").value;
  34. var p = document.getElementById("pcb").value;
  35. var prbc = document.getElementById("prb").value;
  36. if(!c|| !p|| !prbc)
  37. {
  38. alert("ERROR: Please fill in the blanks to procceed");
  39. }
  40. else
  41. {
  42. var code =
  43. "\public "+prbc+"_"+c+"("+p+") \n{ \n //Your code here\n //Call the new version and check if the definition does exist.\n #if defined "+prbc+"_"+c+"\n "+c+"("+p+");\n #endif\n return true;\n}\n\n//Has this been hooked already?\n#if defined "+"_ALS_"+c+"\n #undef "+c+" \n#else\n #define _ALS_"+c+"\n#endif\n\n//Reroute future calls to our function.\n#define "+c+" "+prbc+"_"+c+"\n\n//To make sure there is no undefined error. we check if its defined.\n#if defined "+prbc+"_"+c+"\n forward "+prbc+"_"+c+"("+p+");\n#endif";
  44.  
  45. document.write("<textarea rows='40' cols='70'>"+code+"</textarea>");
  46. }
  47. }
  48. else if(id == 2)
  49. {
  50. var f = document.getElementById("nf").value;
  51. var px = document.getElementById("pf").value;
  52. var prx = document.getElementById("pr").value;
  53. if(!f || !px || !prx)
  54. {
  55. alert("ERROR: Please fill in the blanks to procceed");
  56. }
  57. else
  58. {
  59. var code =
  60. "\stock "+prx+"_"+f+"("+px+") \n{ \n //Your code here\n //Call the old version, no need to check if it exists.\n "+f+"("+px+");\n return true;\n}\n\n//Has this been hooked already?\n#if defined "+"_ALS_"+f+"\n #undef "+f+" \n#else\n #define _ALS_"+f+"\n#endif\n//Reroute future calls to our function.\n#define "+f+" "+prx+"_"+f;
  61.  
  62. document.write("<textarea rows='40' cols='70'>"+code+"</textarea>");
  63. }
  64. }
  65. }
  66. </script>
  67.  
  68. <br />
  69. <br />
  70. <br />
  71. <font color = yellow><b>Credits<br/></b></font>
  72. Original Creator: DanDRT<br/>
  73. Current Updater: pds2k12<br/><br/>
  74. <font color = yellow><b>Hook Method 7<br/></b></font>
  75. Y_Less - Tutorial<br/>
  76. ipsBruno - Technique<br/><br/>
  77.  
  78.  
  79. <div align="center">
  80. <target="_blank">
  81. <img src="http://simplehitcounter.com/hit.php?uid=1671637&f=16776960&b=0" border="0" height="18" width="83" alt="web counter">
  82. </a>
  83. <br>
  84. <target="_blank" style="text-decoration:none;">Total Visits
  85. </a>
  86. </div>
  87. <!-- Hosting24 Analytics Code -->
  88. <script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>
  89. <!-- End Of Analytics Code -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement