Radius Say: RP
#2

pawn Код:
#include <a_samp>
#include <foreach>

public OnPlayerText(playerid, text[])
{
    new string[144], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    format(string, sizeof(string), "%s says: %s", name, text);
    SendNearbyMsg(playerid, string, 5.0, -1);

    return false;
}

SendNearbyMsg(playerid, text[], Float: radius, color)
{
    new Float: pX, Float: pY, Float: pZ;
    GetPlayerPos(playerid, pX, pY, pZ);

    foreach(new i: Player)
    {
        if(IsPlayerInRangeOfPoint(i, radius, pX, pY, pZ))
        {
            SendClientMessage(i, color, text);
        }
    }

    return true;
}
Reply


Messages In This Thread
Radius Say: RP - by Jigsaw123 - 26.09.2014, 17:37
Re: Radius Say: RP - by Dignity - 26.09.2014, 18:00
Re: Radius Say: RP - by DaniceMcHarley - 01.10.2014, 23:01
Re : Radius Say: RP - by AmirRFCNR - 02.10.2014, 10:39

Forum Jump:


Users browsing this thread: 1 Guest(s)