Hello guys.
#1

Hello guys. Please help me making a Whisper command like /w [Message]
The command should make like when you write /w and a message , the message to be showed only to near players.
Just too lazy to /pm...
Reply
#2

pawn Код:
CMD:w(playerid, cmdtext[])
    {
        new string[128];
        if(strlen(cmdtext) <= 3)
        {
            SendClientMessage(playerid, RED,"USAGE: /w (msg)");
            return 1;
        }
        new output[150];
        new pname[24];
        GetPlayerName(playerid, pname, 24);
        strmid(output,cmdtext,2,strlen(cmdtext));
        format(string, sizeof(string), "(WHISPER): %s [%d] %s",pname,playerid,output);
        printf("%s", string);
        for(new i=0;i<MAX_PLAYERS;i++)
        {
            if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 20)
            {
               format(string, sizeof(string), "(WHISPER): %s [%d] %s",pname,playerid,output);
               SendClientMessage(i, YELLOW,string);
            }
        }
        return 1;
    }
Reply
#3

Nice copy&paste, too bad it will only work for you, Kar.
Reply
#4

i gave him mine.. L
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)