Question about ALS methood
#1

Can i use ALS methood on stock?
can use it for role play gamemode? or only for includes?

Like

Код:
Dosomething(playerid)
{
        return 1;
}
Reply
#2

You mean make a stock without a stock?
So like 'stock something(playerid)' becomes 'something(playerid)'?
Reply
#3

I mean create ALS methood for this stock.. stock dosomething(playerid)
Reply
#4

What do you mean by ALS?
Reply
#5

like this:

Код:
stock MyLib_GivePlayerMoney(playerid, amount)
{
	// Call the old version, no need to check if it exists.
	GivePlayerMoney(playerid, amount);
	return 1;
}
// Has this been hooked already?
#if defined _ALS_GivePlayerMoney
	#undef GivePlayerMoney
#else
	#define _ALS_GivePlayerMoney
#endif
// Reroute future calls to our function.
#define GivePlayerMoney MyLib_GivePlayerMoney
Reply
#6

Is this like an anti money cheat script?
Reply
#7

In fact after reading your question again. You can use it like that, as long as the als include in included in your gamemode
Reply
#8

No ALS hook methood is a methood to make function fast as SAMP Call backs..

I want to know if I can hook normal functions like stock dosomething(playerid);
Reply
#9

Use Y_Hooks

https://sampforum.blast.hk/showthread.php?tid=166016
Reply
#10

y_hooks used to hook callbacks not functions....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)