Split text in two - returns я?
#1

Here's my code:
Код:
CMD:do(playerid, params[])
{
	new action[100];
	if(!CharacterLogged(playerid)) return ErrorMSG(playerid, "You are not logged in.");
	if(sscanf(params, "u", action)) return UsageMSG(playerid, "/do [action]");
	
	if(strlen(action) > 80)
	{
		new pos = 80;
		if(pos < 80-1) pos = 80;
		format(msg, sizeof(msg), "* %.*s ... (( %s ))", pos, action, GetNameEx(playerid));
		ProxDetector(20.0, playerid, msg, COLOR_PURPLE);
		format(msg, sizeof(msg), "* ... %s (( %s ))", action[pos], GetNameEx(playerid));
		ProxDetector(20.0, playerid, msg, COLOR_PURPLE);
	}
	else
	{
		format(msg, sizeof(msg), "* %s (( %s ))", action, GetNameEx(playerid));
		ProxDetector(20.0, playerid, msg, COLOR_PURPLE);
		printf("%s", msg);
	}
	return CMD_SUCCESS;
}
ProxDetector:
Код:
stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    foreach(Player,i)
    {
        if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) 
        {
            SendClientMessage(i,color,string);
	    }
    }
}
How can that return "я (( Player_Name ))
Even if it is under 80 characters (when the message doesn't get split into two SCM) I get this. Uh?
Reply


Messages In This Thread
Split text in two - returns я? - by TheBigFive - 04.08.2016, 22:52
Re: Split text in two - returns я? - by AndySedeyn - 04.08.2016, 22:59
Re: Split text in two - returns я? - by TheBigFive - 04.08.2016, 23:01
Re: Split text in two - returns я? - by Konstantinos - 04.08.2016, 23:08

Forum Jump:


Users browsing this thread: 1 Guest(s)