[HTML] Online _ALS Generator [Callback and Function] - Patrick - 12.01.2014
Download
Pastebin:
http://pastebin.com/1x7b6Hxr
Sample Website
http://pds2k12.ml/ALS_Generator/
Credits
DanDRT - Creator
pds2k12 - Updater
Y_Less - Tutorial
ipsBruno - Technique
Callback Hooking
Input
pawn Code:
Callback: OnPlayerConnect
Params: playerid
Prefix: pds
Output
pawn Code:
public OnPlayerConnect(playerid)
{
//Your code here
//Call the new version and check if the definition does exist.
#if defined pds_OnPlayerConnect
pds_OnPlayerConnect(playerid);
#endif
return true;
}
//Has this been hooked already?
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
//Reroute future calls to our function.
#define OnPlayerConnect pds_OnPlayerConnect
//To make sure there is no undefined error. we check if its defined.
#if defined pds_OnPlayerConnect
forward pds_OnPlayerConnect(playerid);
#endif
Function Hooking
Input
pawn Code:
Function: GivePlayerMoney
Params: playerid, amount
Prefix: pds
Output
pawn Code:
stock pds_GivePlayerMoney(playerid, amount)
{
//Your code here
//Call the old version, no need to check if it exists.
GivePlayerMoney(playerid, amount);
return true;
}
//Has this been hooked already?
#if defined _ALS_GivePlayerMoney
#undef GivePlayerMoney
#else
#define _ALS_GivePlayerMoney
#endif
//Reroute future calls to our function.
#define GivePlayerMoney pds_GivePlayerMoney
Re: [HTML] Online _ALS Generator [Callback and Function] -
WopsS - 12.01.2014
Hmm, good generator

Great job.
Respuesta: [HTML] Online _ALS Generator [Callback and Function] -
DanDRT - 12.01.2014

Great Update
Re: [HTML] Online _ALS Generator [Callback and Function] - Patrick - 12.01.2014
Quote:
Originally Posted by WopsS
Hmm, good generator  Great job.
|
Quote:
Originally Posted by DanDRT
 Great Update
|
Thanks!
Re: [HTML] Online _ALS Generator [Callback and Function] -
Krisna - 18.01.2014
nice generator !!
and your domain from freenom.com right ? :3
.ml = making love
HAHAHAH JUST KIDDING
Re: [HTML] Online _ALS Generator [Callback and Function] -
Luis- - 21.01.2014
What is the "pds" thing for if you don't mind me asking?
Re: [HTML] Online _ALS Generator [Callback and Function] - Patrick - 21.01.2014
Quote:
Originally Posted by Luis-
What is the "pds" thing for if you don't mind me asking?
|
pds is an example prefix on the website, anyways you can change it to what ever you want.
PDS = My full name in shortcut.
Re: [HTML] Online _ALS Generator [Callback and Function] - Patrick - 21.01.2014

Quote:
Originally Posted by Y_Less
Should be:
The current version will get stuck in a loop.
|
Oh-shit!, on the website the code is fine but I forgot to update the code in the download link, thanks for pointing that out! also updated my example code.
Re: [HTML] Online _ALS Generator [Callback and Function] - Patrick - 21.01.2014
Quote:
Originally Posted by Y_Less
In that case:
That doesn't actually call the old version.
|
Fuck, #Fail forgot to add
GivePlayerMoney(...), once again thank you for pointing that out.
UPDATED
- Fixed the download link.
- Fixed the function hooking, it does call the old version now.
- Fixed the callback hooking, it does get stuck on the loop anymore.
- Sample website has been updated to its newest.
Re: [HTML] Online _ALS Generator [Callback and Function] -
Y_Less - 21.01.2014
Sorry, I should report these all at once:
pawn Код:
public Hooked_OnPlayerText(playerid, text[])
{
//Your code here
//Call the new version and check if the definition does exist.
#if defined Hooked_OnPlayerText
OnPlayerText(playerid, text[]);
#endif
return true;
}
//Has this been hooked already?
#if defined _ALS_OnPlayerText
#undef OnPlayerText
#else
#define _ALS_OnPlayerText
#endif
//Reroute future calls to our function.
#define OnPlayerText Hooked_OnPlayerText
//To make sure there is no undefined error. we check if its defined.
#if defined Hooked_OnPlayerText
forward Hooked_OnPlayerText(playerid, text[]);
#endif
Syntax error on the next call line. Same if you do "const text[]".
Also:
pawn Код:
stock Hooked_strcat(dest[], source[], maxlength = sizeof (dest))
{
//Your code here
//Call the old version, no need to check if it exists.
strcat(dest[], source[], maxlength = sizeof (dest));
return true;
}
//Has this been hooked already?
#if defined _ALS_strcat
#undef strcat
#else
#define _ALS_strcat
#endif
//Reroute future calls to our function.
#define strcat Hooked_strcat
I do hope you can fix these issues! It looks like a useful tool.
Re: [HTML] Online _ALS Generator [Callback and Function] -
Luis- - 21.01.2014
Quote:
Originally Posted by pds2k12
pds is an example prefix on the website, anyways you can change it to what ever you want.
PDS = My full name in shortcut.
|
Ah, I see. Anyway, thanks
Re: [HTML] Online _ALS Generator [Callback and Function] -
Misiur - 27.01.2014
For you sublime users, grab my snippet for functions -
gist link. Feel free to fork and update
Re: [HTML] Online _ALS Generator [Callback and Function] -
Y_Less - 27.01.2014
Quote:
Originally Posted by Misiur
For you sublime users, grab my snippet for functions - gist link. Feel free to fork and update
|
That has the same problem I mentioned in my last post.
Re: [HTML] Online _ALS Generator [Callback and Function] -
Misiur - 27.01.2014
I'm aware of that, but if you like tabbing a little more:
updated