[Ajuda] Chat Profissгo
#2

pawn Код:
COMMAND:cp(playerid, params[])
{
    new Name[24], Msg[128], Message[128];

    SendAdminText(playerid, "/cp", params);

    GetPlayerName(playerid, Name, sizeof(Name));

    if (Info[playerid][LoggedIn] == true)
    {
        if (sscanf(params, "s[128]", Message)) SendClientMessage(playerid, 0xFF0000AA, "(ERRO) {7FFFD4}USE: /cp [TEXTO]");
        else
        {
            for (new i; i < MAX_PLAYERS; i++)
            {
                if (Info[i][LoggedIn] == true)
                {
        if(Info[i][zProfissao] == Info[playerid][zProfissao])
                    {
                        format(Msg, 128, "{7FFFD4}(Chat Profissгo) {AFEEEE}%s{7FFFD4}: {AFEEEE}%s", Name, Message);
                        SendClientMessage(i, 0xFFFFFFFF, Msg);
                    }
                }
            }
        }
    }
    else
        return 0;

    return 1;
}
Reply


Messages In This Thread
Chat Profissгo - by Rhayziin - 25.09.2012, 22:43
Re: Chat Profissгo - by Nill.Oliveira - 26.09.2012, 00:46

Forum Jump:


Users browsing this thread: 1 Guest(s)