09.01.2010, 10:34
For example, I call GetPlayerName.
Sometimes i got incorrect name (for example, dLASH48 instead of FLASH4
or... part of some chat message.
What's the problem?
InvokeAMX is defined and works fine...
Sometimes i got incorrect name (for example, dLASH48 instead of FLASH4

What's the problem?
Code:
cell amxArgs[4]; cell *nameCellAddr; amxArgs[0] = 3 * sizeof(cell); amxArgs[1] = player; amx_Allot(AMX, MaxPlayerNameLength, amxArgs + 2, &nameCellAddr); amxArgs[3] = MaxPlayerNameLength; InvokeAMX(Native::GetPlayerName, amxArgs); char* name = new char[MaxPlayerNameLength]; amx_GetString(name, nameCellAddr, 0, MaxPlayerNameLength); amx_Release(AMX, amxArgs[2]); return name;