[Ajuda] Como Crio Um Chat Da Familia
#9

Compilando e Funcionando


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;
        }
Reply


Messages In This Thread
Como Crio Um Chat Da Familia - by gabrielloko157 - 02.08.2012, 18:26
Re: Como Crio Um Chat Da Familia - by Weslly Stronda - 02.08.2012, 18:56
Re: Como Crio Um Chat Da Familia - by ShutDown_ - 02.08.2012, 20:48
Re: Como Crio Um Chat Da Familia - by Victor' - 02.08.2012, 20:53
Re: Como Crio Um Chat Da Familia - by Maklister - 02.08.2012, 21:16
Re: Como Crio Um Chat Da Familia - by paulor - 02.08.2012, 22:00
Re: Como Crio Um Chat Da Familia - by Maklister - 02.08.2012, 22:08
Re: Como Crio Um Chat Da Familia - by paulor - 02.08.2012, 22:25
Re: Como Crio Um Chat Da Familia - by andmeida10 - 03.08.2012, 10:11
Re: Como Crio Um Chat Da Familia - by gabrielloko157 - 03.08.2012, 16:31

Forum Jump:


Users browsing this thread: 1 Guest(s)