20.02.2013, 10:52
Hey, i have this commnat for /txt and when somebody /txt BLABLABLA need to show:
ADMIN: Nickname : BLABLABLA
But the nickname is not there :@
ADMIN: Nickname : BLABLABLA
But the nickname is not there :@
pawn Код:
if(strcmp(cmd, "/txt", true) == 0) // By CuervO_NegrO
{
if (PlayerInfo[playerid][pAdmin] >= 2)
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
idx++;
if(!strlen(result)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /txt [text]");
format(string, sizeof(string), "* ADMIN %s: %s ",sendername,(result));
SendClientMessageToAll(0x2587CEFF, string);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
}
return 1;
}