/me command
#1

Hi again!I tried to make a /me command.
The command works but it has a little bug.
Код:
CMD:me(playerid, text[])
{
	new string[128];
	if(sscanf(text, "u", text)) return SendClientMessage(playerid, -1, "{a09d7b}SYNTAX: /me [action]");
	else {
		format(string, 128, "* %s %s", GetName(playerid), text);
		for(new i = 0; i < MAX_PLAYERS; i++){
				new Float: Pos[3];
				GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
				if(IsPlayerInRangeOfPoint(i, 10.0, Pos[0], Pos[1], Pos[2]))
				{
					SendClientMessage(i, COLOR_ME, string);
				}
			}
		}
	return 1;
}
The problem is the first character I wrote is replaced with "я".
For example, I wrote /me this is a test. and the result is:
Код:
* RetroEX яhis is a test.
Why is this happening?
Reply


Messages In This Thread
/me command - by RetroEX - 01.02.2019, 16:38
Re: /me command - by TheToretto - 01.02.2019, 17:05
Re: /me command - by RetroEX - 02.02.2019, 16:02

Forum Jump:


Users browsing this thread: 2 Guest(s)