11.07.2009, 10:40
Quote:
Originally Posted by °ғαιιοцт°
Why should I use CallLocalFunction if I can also just use the function's name to call it?
example: Код:
forward examplefunction(playerid, Float:angle); public examplefunction(playerid, Float:angle) { SetPlayerFacingAngle(playerid, angle); return 1; } /* somewhere else in the script: */ CallLocalFunction("examplefunction", "if", playerid, "90.0"); /* but I could also use this: */ examplefunction(playerid, "90.0"); |
What CallRemoteFunction does, is call public callbacks from every single loaded AMX. Imagine it as the reason why OnPlayerDeath works. Sometimes it's better to use it instead of calling it directly because it helps make libraries more flexable, etc.