22.11.2012, 09:57
Here's the command, Whenever I go IG and try it, it first gives out "(( (ID)MyName: ... ))" and then on the next line "(( (ID)MyName: .... )) )) " Yes, the second time, there are two )).
pawn Код:
CMD:b(playerid,params[])
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_SYNTAX,"[SYNTAX]: /b [TEXT HERE]");
new sendername[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid,sendername,sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
if(strlen(params) > 24)
{
new part1[24];
new part2[44];
strmid(part1,string,0,23,24);
format(string, sizeof(string), "(( (ID:%d) %s: %s... ))", playerid, GetName(playerid), part1);
ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
strmid(part2,string,24,128,44);
format(string, sizeof(string), "(( (ID:%d) %s: ...%s ))", playerid, GetName(playerid), part2);
ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
}
else
{
format(string, sizeof(string), "(( (ID:%d) %s: %s ))", playerid, GetName(playerid), params);
ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
}
return 1;
}