Whisper color?
#1

Hey, I got an idea for VIPS on my GF server like
/setwc, you set your color to your whisper.
When you whisper a player, he sees it the color you set.
Reply
#2

We need code so we say to you ...
Reply
#3

What code?
Reply
#4

What are you trying to say/explain?
Reply
#5

A command, /setwc (set whisper color)
When you /whisper someone, the whisper appears the color you set.
Reply
#6

So no one
Reply
#7

pawn Код:
if(strcmp(cmd, "/whisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");
                return 1;
            }
            if(PlayerInfo[playerid][pLevel] < 3)
            {
                SendClientMessage(playerid, COLOR_LIGHTGREEN, "   You must be level 3 to use this!");
                return 1;
            }
            if(PlayerInfo[playerid][pMuted] == 1)
            {
                SendClientMessage(playerid, TEAM_CYAN_COLOR, "   You can't speak, you have been silenced !");
                return 1;
            }
            if(PlayerTied[playerid] > 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "  you can`t use this command because you are tied!");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: (/w)isper [playerid/PartOfName] [whisper text]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if(HidePM[giveplayerid] > 0)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "   That player is blocking Whispers !");
                        return 1;
                    }
                    /*if(AFKCheck[giveplayerid] > 0)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "   That player is afk !");
                        return 1;
                    }*/

                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    if(giveplayerid == playerid)
                    {
                        format(string, sizeof(string), "* %s mutters somthing.", sendername);
                        ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    }
                    new length = strlen(cmdtext);
                    while ((idx < length) && (cmdtext[idx] <= ' '))
                    {
                        idx++;
                    }
                    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))
                    {
                        SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: (/w)isper [playerid/PartOfName] [whisper text]");
                        return 1;
                    }
                    format(string, sizeof(string), "{80FF80}%s(ID: %d) {FFFFFF}whispers: {80FF80}%s", sendername, playerid, (result));
                    SendClientMessage(giveplayerid, COLOR_WHITE, string);
                    format(string, sizeof(string), "Whisper sent to {80FF80}%s(ID: %d) {FFFFFF}%s", giveplayer, giveplayerid, (result));
                    SendClientMessage(playerid, COLOR_WHITE, string);

                    SBizzInfo[2][sbTill] += txtcost;
                    ExtortionSBiz(2, txtcost);

                    for(new i = 0; i <= MAX_PLAYERS; i++)
                    {
                        if(IsPlayerConnected(i))
                        {
                            if(BigEar[i] == 1 && i != playerid && i != giveplayerid)
                            {
                                format(string, sizeof(string), "[BigEar] {80FF80}%s (ID: %d) {FFFFFF}to {80FF80}%s (ID: %d): {FFFFFF}%s", sendername, playerid, giveplayer, giveplayerid, (result));
                                SendClientMessage(i, COLOR_WHITE, string);
                            }
                        }
                    }
                    new y,m,d;
                    new h,mi,s;
                    getdate(y,m,d);
                    gettime(h,mi,s);
                    format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s(ID: %d) to %s(ID: %d): %s",d,m,y,h,mi,s,sendername, playerid, giveplayer, giveplayerid, (result));
                    ChatLog(string);
                    return 1;
                }
            }
            else
            {
                    format(string, sizeof(string), "Playerul nu este pe server.", giveplayerid);
                    SendClientMessage(playerid, COLOR_GRAD1, string);
            }
        }
        return 1;
    }
Leave the VIP part.
I need /setwc (Set Whisper Color), when you whisper someone, it shows to him the color you set for your whispers.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)