03.12.2012, 22:55
Chat .
pawn Код:
//===================================[Familia Chat]=============================//
if(strcmp(cmd, "/cf", true) == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(strfind(pName, "_Familia", false) != -1)//Ali em _Familia voce coloca o sobrenome do cara.
{
new length = strlen(cmdtext);
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(strlen(result) == 0) return SendClientMessage(playerid, -1, "USO: /cf [Texto]");
new str[128];
format(str, sizeof(str), "[Nome Da Familia]%s %s", pName, result);
new i = 0;
while(i < MAX_PLAYERS)
{
new nick1[MAX_PLAYER_NAME];
GetPlayerName(i, nick1, sizeof(nick1));
if(strfind(nick1, "_DevianCe", false) != -1)
{
SendClientMessage(i, 0xFFAAFFAA, str);
}
i++;
}
}
return 1;
}