[Ajuda] /chatfamilia (/cf)
#4

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


Messages In This Thread
/chatfamilia (/cf) - by StarAway - 03.12.2012, 00:50
Re: /chatfamilia (/cf) - by StarAway - 03.12.2012, 01:15
Re: /chatfamilia (/cf) - by StarAway - 03.12.2012, 16:03
Respuesta: /chatfamilia (/cf) - by gabrielloko157 - 03.12.2012, 22:55
Re: /chatfamilia (/cf) - by StarAway - 04.12.2012, 02:39
Respuesta: /chatfamilia (/cf) - by gabrielloko157 - 05.12.2012, 08:33

Forum Jump:


Users browsing this thread: 2 Guest(s)