Jump to content
  • 0

Help chat


PauLL

Question

Salutare ,am cautat si nu am gasit.Am facut pe serverul meu un fel de system de premium account[vip] si ma intrebam cum pot sa fac un CHAT doar pentru ei ..sa fie /vip mesaj si sa vada doar vip,as fii recunoscator.Multumesc![un fel de chat pt admini doar ca pentru vip]

Ms anticipat.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

[pawn]if(strcmp(cmd, "/vip", true) == 0 || strcmp(cmd, "/vipchat", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(PlayerData[playerid][pMuted] == 1)

{

SendClientMessage(playerid, COLOR_LIGHTRED, "Nu poti sa vorbesti, esti mutit!");

return 1;

}

    if(gPlayerLogged[playerid] == 0)

        {

            SendClientMessage(playerid, COLOR_GREY, "Nu esti logat inca!");

            return 1;

        }

        new length = strlen(cmdtext);

while ((idx < length) && (cmdtext[idx] <= ' '))

{

idx++;

}

new offset = idx;

new result[256];

while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))

{

result[idx - offset] = cmdtext[idx];

idx++;

}

result[idx - offset] = EOS;

result[0] = toupper(result[0]);

if(!strlen(result))

{

SendUsage(playerid,"(/vip)chat [VIP chat]");

return 1;

}

GetPlayerName(playerid, sendername, sizeof(sendername));

if (PlayerData[playerid][pAgent] >= 1 && PlayerData[playerid][pAdmin] == 0)

{

                format(string, sizeof(string), "* VIP%s: %s", sendername, result);

                ABroadCast(COLOR_YELLOW2, string,1);

SBroadCast(COLOR_YELLOW2, string);

}

else if (PlayerData[playerid][pAdmin] >= 1)

{

                format(string, sizeof(string), "* Admin %s: %s", sendername, result);

                ABroadCast(COLOR_YELLOW2, string,1);

SBroadCast(COLOR_YELLOW2, string);

}

}

return 1;

}[/pawn]

Cam asa ar ar?ta, dac? întâmpini probleme, las? un reply.

Ps: Nu se cer scripturi. Înv??a?i-v? s? face?i voi, ?i noi v? ajut?m.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.