05.11.2011, 15:30
Alright guys, I have no idea how to do this.
Maybe you've seen.. when you type a text with a big length it automaticly moves to a new row. For example you type:
"Hello I'm new can I get admin and shit I like the server blhablah"
And it sends: "Hello I'm new can I get ad" and that's it.
But how to do it like:
"Hello I'm new can I get admin and...
... shit I like the server blhablah" ?
Can you show me for example for the /b command?
Maybe you've seen.. when you type a text with a big length it automaticly moves to a new row. For example you type:
"Hello I'm new can I get admin and shit I like the server blhablah"
And it sends: "Hello I'm new can I get ad" and that's it.
But how to do it like:
"Hello I'm new can I get admin and...
... shit I like the server blhablah" ?
Can you show me for example for the /b command?
pawn Код:
else if(strcmp(cmd, "/b", true) == 0 || strcmp(cmd, "/и", true) == 0)
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "First you need to log in!");
if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_LIGHTRED,"You have a chat ban.");
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
new succ;
for(new i; i<strlen(result); i++)
{
if(PText[playerid][i] == result[i]) succ++;
}
if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "Type: /b [message]");
format(string, sizeof(string), "{ff6600}(( {ffffff}%s: %s {ff6600}))", sendername, result);
ProxDetector(20.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
printf("%s", string);
Flood[playerid] = 4;
return 1;
}