18.03.2010, 12:37
i assume you mean callback like:
and stock like this:
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
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
Код:
public functionname(){
}
Код:
stock functionname(){
}
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);
I hope thats right but thats my understanding

