You can't pass arguments to most of the native functions (naturally including SendClientMessage)
You need to use format before, like this:
You need to use format before, like this:
Code:
if (strcmp("/getpos", cmdtext, true, 7) == 0)
{
// Do something here
// 64 is the size of the string
new buffer[64], Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
format(buffer, sizeof(buffer), "Position: %f, %f, %f.", x, y, z);
SendClientMessage(playerid, -1, buffer);
return 1;
}
return 0;
Using Pawn.CMD?
If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.