Making an /L command
#6

SendClientMessageToAll:

pawn Код:
if(!strcmp("/l", cmdtext, true, 2)) {
        if(!cmdtext[2]) return SendClientMessage(playerid, RED, "THIS IS HOW WE DO IT: /l [Local Chat]");
        new str[256];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "%s says: %s", str, cmdtext[3]);
        for (new i=0; i<=MAX_PLAYERS; i++){
            new
                Float:x,
                Float:y,
                Float:z;
            GetPlayerPos(playerid, x, y, z);
            switch(GetPlayerDistanceFromPoint(i, x, y, z)){
                case 0..5: SendClientMessageToAll(COLOR_FADE1, str);
                case 6..10: SendClientMessageToAll(COLOR_FADE2, str);
                case 11..15: SendClientMessageToAll(COLOR_FADE3, str);
                case 16..20: SendClientMessageToAll(COLOR_FADE4, str);
                case 21..25: SendClientMessageToAll(COLOR_FADE5, str);
            }
        }
        return 1;
    }
May be this help,
Reply


Messages In This Thread
Making an /L command - by iPoisonxL - 03.07.2013, 15:42
Re: Making an /L command - by iPoisonxL - 03.07.2013, 16:10
Re: Making an /L command - by TheStreetsRP - 03.07.2013, 16:11
Re: Making an /L command - by introzen - 03.07.2013, 16:12
Re: Making an /L command - by iPoisonxL - 03.07.2013, 16:22
Re: Making an /L command - by Anak - 03.07.2013, 17:06
Re: Making an /L command - by iPoisonxL - 03.07.2013, 17:11
Re: Making an /L command - by Antonio144 - 03.07.2013, 17:21
Re: Making an /L command - by tony_fitto - 03.07.2013, 17:28
Re: Making an /L command - by iPoisonxL - 04.07.2013, 10:25

Forum Jump:


Users browsing this thread: 2 Guest(s)