04.01.2013, 21:18
It is used in functions with many optional parameters, when you want to directly skip to a parameter, the ones before it stays with the default value.
Let's say we have this function
You want to set only cash to this playerid, so you can do directly in a callback:
So the function will look internal like:
After . you have to use parameter's exact name to work !
Let's say we have this function
pawn Код:
native MyFunction( playerid, Interior = 0, World = 1, Cash = 1000, Fat = 10 );
pawn Код:
MyFunction( playerid, .Cash = 421 );
pawn Код:
MyFunction( playerid, 0, 1, 421, 10 );