On public called - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: On public called (
/showthread.php?tid=384357)
On public called -
Swimor - 11.10.2012
Hello,
I'm building something and i want to do something like this:
On any public called -> call X_X stock.
Is it posible?
Re: On public called -
Jack.7331 - 11.10.2012
I think I get what you're saying - you want your stock, let's call it X, to be called under a callback?
You would simply just do stockname(parameters); or stockname(); if there aren't any.
Re: On public called -
Roel - 11.10.2012
I don't think he means that, I think he means he want call a stock in every callback that is called without having to put it in every callback.
But I don't know if that is possible.
Re: On public called -
Swimor - 11.10.2012
Quote:
Originally Posted by Jack.7331
I think I get what you're saying - you want your stock, let's call it X, to be called under a callback?
You would simply just do stockname(parameters); or stockname(); if there aren't any.
|
Quote:
Originally Posted by Roel
I don't think he means that, I think he means he want call a stock in every callback that is called without having to put it in every callback.
But I don't know if that is possible.
|
^ He got it, but how o do it?
Re: On public called -
PrawkC - 11.10.2012
Inside what ever callback you put your method inside it.
IE
Код:
public OnPlayerSpawn(playerid)
{
MyMethod();
return 1;
}
Re: On public called -
Swimor - 11.10.2012
No, i want every callback will call stock, without adding any code into callback..
Re: On public called -
PrawkC - 11.10.2012
Quote:
Originally Posted by Swimor
No, i want every callback will call stock, without adding any code into callback..
|
I don't think so.. Unless you made an include or something that hooked to every callback.