18.09.2012, 10:00
Quote:
What's the difference between: public ABC() | stock ABC() As far as i know theres quite some difference. A Public function can be called in a timer, needs to be forwarded and mostly returns something; inside a public function there can be other functions, things to do. Like unfreeze someone.. A stock function can be used to make a function that can be used in commands. I created (many did too) SCM, this is the shortened version of SendClientMessage, but has same parameters. stock functions cant be used in timers. they don't have to be forwarded aswell. So if you wish to make a new function, like GetPlayerZPos, (returns the player's height) use stock. If you would like to Get the player's Z pos every 50 seconds, then use the stock inside a public function and put a timer on the function. Stock makes functions (can use them too) Public uses functions Example of SCM stock SCM(playerid, color, const message[]){return SendClientMessage(playerid,color,message);} |