Getting 'array's from amxx native calls
If my title makes sence ><
I'm doing an AMXx native in amxx and I know theres get_param but what about get_param_string or get_param_array, etc. Thanks. |
http://www.amxmodx.org/funcwiki.php?go=func&id=833
http://www.amxmodx.org/funcwiki.php?go=func&id=825 There a bunch of them.. Look inside of amxmodx.inc for the rest |
Would this also include more then one dimensional arrays?
what about string arrays? or would get_array in theory really cover string and array? |
Quote:
|
Quote:
but lets say you have charName[][] example charName[0][] = "Monkey"; charName[1][] = "Ape"; setCharName(charName); would it just be: get_array(1, charNames, 34); how would it all work out? |
You cannot pass two dimensional arrays to natives.
|
Quote:
How disappointing is that :oops: Now my pawn code to solve the meaning of life is ruined, thanks :lol: |
You can, in theory, simply pass the first index of the double array by reference, then use pointer math to put it to the correct index, and convert it afterwards.
This is why I asked for those natives BAIL ^~ |
Quote:
|
Twilight, mind an example?
Bailopan: But not knowing the size, isnt that as simple providing the size then? setCharName(charName, 2, 34) ? with a get_array which is like get_array(charName, 0, 34) would get me 'Monkey' and get_array(charName, 1, 34) would get 'Ape' Btw, yes make shexy natives. |
| All times are GMT -4. The time now is 16:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.