14.06.2015, 17:11
Quote:
const modifier makes a variable unchangeable.But the purpose of using const in function parameters is to allow the compiler to make optimizations.
addsiren is self-explanatory. |
but how store the weapon name if the parameter is unchangeable?
native GetWeaponName(weaponid, const weapon[], len);
another example:
0.3.7:
native SetPlayerName(playerid, const name[]); //ok good for SetPlayerName(1,"Miguel"); //"Miguel" is constant
native GetPlayerName(playerid, const name[], len); //what? xd