How to send a global message?
#2

pawn Код:
if(strcmp(cmd, "/l", true) == 0 || strcmp(cmd, "/local", true) == 0)
    {
        new message[256], Float:x, Float:y, Float:z;
        GetPlayerName(playerid, sendername, sizeof(sendername));
        message = strrest(cmdtext, idx);
        if(!strlen(message))
        {
            SendClientMessage(playerid, COLOR_PINK,"USAGE: /l(ocal) [message]");
            return 1;
        }
        for(new i=0; i <= GetMaxPlayers(); i++)
        {
            GetPlayerPos(playerid, x, y, z);
            if(PlayerToPoint(10.0, playerid, x, y, z))
            {
                format(string, sizeof(string),"%s(%d) says: %s", sendername, playerid, message);
                SendClientMessageToAll(COLOR_PURPLE, string);
                return 1;
            }
        }
        }
        return 1;
    }
Reply


Messages In This Thread
How to send a global message? - by KennethRandall - 02.08.2010, 20:21
Re: How to send a global message? - by cofy1 - 02.08.2010, 20:40
Re: How to send a global message? - by Hiddos - 02.08.2010, 20:40
Re: How to send a global message? - by KennethRandall - 02.08.2010, 20:43
Re: How to send a global message? - by KennethRandall - 02.08.2010, 20:46
Re: How to send a global message? - by Conroy - 02.08.2010, 21:19
Re: How to send a global message? - by KennethRandall - 02.08.2010, 21:30
Re: How to send a global message? - by Conroy - 02.08.2010, 21:45

Forum Jump:


Users browsing this thread: 1 Guest(s)