Stock and Callback differences
#2

i assume you mean callback like:

Код:
public functionname(){
}
and stock like this:

Код:
stock functionname(){
}
going on this basis differences.

public has to be forwarded and is used for calls to the function to do something

example: Send a Message after a timer, run a script such as connect to a database etc.

stock does not need forwarding and works the same way as a public, i use the stock for commonly required functions such as my stock i made recently to create a car at a distance from me for a cost

Код:
MakeVeh(playerid, type, vehiclemodel, cost, distance);
Although you can use a public in the same way you use 1 less line and it cant be included from a file with stocks in (#include stockfile)

I hope thats right but thats my understanding
Reply


Messages In This Thread
Stock and Callback differences - by KuHS - 18.03.2010, 12:08
Re: Stock and Callback differences - by adsy - 18.03.2010, 12:37
Re: Stock and Callback differences - by Zeex - 18.03.2010, 12:53
Re: Stock and Callback differences - by Correlli - 18.03.2010, 12:55
Re: Stock and Callback differences - by KuHS - 18.03.2010, 12:56
Re: Stock and Callback differences - by adsy - 18.03.2010, 13:02

Forum Jump:


Users browsing this thread: 1 Guest(s)