03.08.2012, 10:11
Compilando e Funcionando ![Cheesy](images/smilies/biggrin.png)
![Cheesy](images/smilies/biggrin.png)
pawn Код:
if(strcmp(cmd, "/gw", true) == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(strfind(pName, "_Gewalt", false) != -1)
{
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: /gw [Texto]");
new str[128];
format(str, sizeof(str), "%s [Familia Gewalt]: %s", pName, result);
new i = 0;
while(i < MAX_PLAYERS)
{
new nick1[MAX_PLAYER_NAME];
GetPlayerName(i, nick1, sizeof(nick1));
if(strfind(nick1, "_Gewalt", false) != -1)
{
SendClientMessage(i, 0xFFAAFFAA, str);
}
i++;
}
}
return 1;
}