Looking for Prox Detector
#2

Here is mine that I use in my custom gamemode. Change the PlayerInfo[playerid][Logged] to what ever you use to check if the player is connected. Other then that here it is.
pawn Код:
stock SendRangedMessage(sourceid, color, message[], Float:range)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(sourceid, x, y, z);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][Logged] == 1)
        {
            if(GetPlayerVirtualWorld(sourceid) == GetPlayerVirtualWorld(i))
            {
                if(IsPlayerInRangeOfPoint(i, range, x, y, z))
                {
                    SendClientMessage(i, color, message);
                }
            }
        }
    }
    return 1;
}
EDIT: Mine detects if the player is in the same world and if they are logged also.
Reply


Messages In This Thread
Looking for Prox Detector - by DDodo - 10.09.2011, 17:10
Re: Looking for Prox Detector - by AustinJ - 10.09.2011, 17:14
Re: Looking for Prox Detector - by Max_Coldheart - 10.09.2011, 17:16
Re: Looking for Prox Detector - by DDodo - 10.09.2011, 17:23
Re: Looking for Prox Detector - by =WoR=Varth - 10.09.2011, 17:24
Re: Looking for Prox Detector - by Jafet_Macario - 10.09.2011, 17:24

Forum Jump:


Users browsing this thread: 6 Guest(s)