06.01.2010, 07:37
Quote:
Originally Posted by SMX
Quote:
First you need to locate it's address which only has to be done once so thats not much of a problem. Next is allocating an array of cells in the AMX for the text string you want to send. Then you need to convert and copy your string from a char array to that array of cells. All that before you can call it. Now if we would separate the AMX the prototype for SendClientMessage would probably look like this: Код:
int SendClientMessage(int playerid, int colour, char* text); int SendClientMessage(int playerid, int colour, wchar_t* text); //Support non latin languages? Calling functions that pass arguments by reference also require you to allocate space in the AMX. Think of GetPlayerPos used for a speedometer, how many times does that get called for each player per second? See how it's adding up now? |