Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <center>
- <font face=Arial>
- <body bgcolor="#6495ED"> </body>
- <p>
- <font size = 6 color = YELLOW>
- Hook a Callback
- </font>
- </p>
- Callback: <input id="ncb" size=36></input> (example = OnPlayerConnect)<br/>
- Params: <input id="pcb" size=36></input> (example = playerid)<br/>
- Prefix: <input id="prb" size=36></input> (example = pds)<br/>
- <button onClick="cc(1)">Proccess</button><br/>
- <p><font size=6 color = YELLOW>Hook a Function</font><br/>
- Fuction: <input id="nf" size=36></input> (example = GivePlayerMoney)<br/>
- Params: <input id="pf" size=36></input> (example = playerid, amount)<br/>
- Prefix: <input id="pr" size=36></input> (example = pds)<br/>
- <button onClick="cc(2)">Proccess</button>
- <progress max="100" id="progress" style="display:none;"></progress>
- <script>
- var count = 0;
- function cc(id)
- {
- if(id == 1)
- {
- var c = document.getElementById("ncb").value;
- var p = document.getElementById("pcb").value;
- var prbc = document.getElementById("prb").value;
- if(!c|| !p|| !prbc)
- {
- alert("ERROR: Please fill in the blanks to procceed");
- }
- else
- {
- var code =
- "\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";
- document.write("<textarea rows='40' cols='70'>"+code+"</textarea>");
- }
- }
- else if(id == 2)
- {
- var f = document.getElementById("nf").value;
- var px = document.getElementById("pf").value;
- var prx = document.getElementById("pr").value;
- if(!f || !px || !prx)
- {
- alert("ERROR: Please fill in the blanks to procceed");
- }
- else
- {
- var code =
- "\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;
- document.write("<textarea rows='40' cols='70'>"+code+"</textarea>");
- }
- }
- }
- </script>
- <br />
- <br />
- <br />
- <font color = yellow><b>Credits<br/></b></font>
- Original Creator: DanDRT<br/>
- Current Updater: pds2k12<br/><br/>
- <font color = yellow><b>Hook Method 7<br/></b></font>
- Y_Less - Tutorial<br/>
- ipsBruno - Technique<br/><br/>
- <div align="center">
- <target="_blank">
- <img src="http://simplehitcounter.com/hit.php?uid=1671637&f=16776960&b=0" border="0" height="18" width="83" alt="web counter">
- </a>
- <br>
- <target="_blank" style="text-decoration:none;">Total Visits
- </a>
- </div>
- <!-- Hosting24 Analytics Code -->
- <script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>
- <!-- End Of Analytics Code -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement