strcmp /me command with radius
#5

pawn Код:
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
    {
        if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        new Float:Pos[3];
        format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
        for(new i; i < MAX_PLAYERS; i++)
        {
            // 5 is the range
            if(IsPlayerInRangeOfPoint(i, Pos[0], Pos[1], Pos[2], 5))
                SendClientMessage(i, str, 0xFFFF00AA);
        }
        return 1;
    }
Reply


Messages In This Thread
strcmp /me command with radius - by Rabbayazza - 25.07.2012, 09:00
Re: strcmp /me command with radius - by JaKe Elite - 25.07.2012, 09:04
Re: strcmp /me command with radius - by Jstylezzz - 25.07.2012, 09:06
Re: strcmp /me command with radius - by Rabbayazza - 25.07.2012, 09:06
Re: strcmp /me command with radius - by Pinguinn - 25.07.2012, 09:10
Re: strcmp /me command with radius - by Jstylezzz - 25.07.2012, 09:11
Re: strcmp /me command with radius - by Rabbayazza - 25.07.2012, 09:12
Re: strcmp /me command with radius - by Rabbayazza - 25.07.2012, 09:14
Re: strcmp /me command with radius - by Jstylezzz - 25.07.2012, 09:17
Re: strcmp /me command with radius - by Rabbayazza - 25.07.2012, 09:21

Forum Jump:


Users browsing this thread: 5 Guest(s)