19.06.2012, 18:12
pawn Код:
if(strcmp(cmd, "/fking", true) == 0 || strcmp(cmd, "/familiaking", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, Nome, 25);
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;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /fking ou /familiaking [Chat Familia]");
return 1;
}
if(strfind(Nome, "King", true) != -1)
{
format(string, sizeof(string), "Famнlia King %s: %s", PlayerName(playerid), result);
FKingBroadCast(COLOR_AZULBB, string, 1);
}
printf("%s", string);
}
return 1;
}