01.02.2019, 16:38
Hi again!I tried to make a /me command.
The command works but it has a little bug.
The problem is the first character I wrote is replaced with "я".
For example, I wrote /me this is a test. and the result is:
Why is this happening?
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; }
For example, I wrote /me this is a test. and the result is:
Код:
* RetroEX яhis is a test.