04.08.2016, 22:52
Here's my code:
ProxDetector:
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?
Код:
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; }
Код:
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); } } }
Even if it is under 80 characters (when the message doesn't get split into two SCM) I get this. Uh?