OnRangePointOf Answer + REP
#1

removed.
Reply
#2

pawn Код:
foreach(Player, i)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(i, X, Y, Z);
    if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
    {
        // play your sound.
    }
}
// Oh, you've removed the question. Too late..
Reply
#3

And how to use this system only for an admin with a specified name like: Rodri and online?
If someone is near an admin with a specified name and not level, the audio starts.
Reply
#4

Add this code to an one-second timer.
pawn Код:
foreach(Player, i)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(i, X, Y, Z);
    if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
    {
         if(PlayerInfo[i][Admin] > 0)
         {
             // play your sound for playerid.
         }
    }
}
- OR -

pawn Код:
foreach(Player, i)
{
    new Float:X, Float:Y, Float:Z, playername[12];
    GetPlayerName(i, playername, sizeof(playername));
    GetPlayerPos(i, X, Y, Z);
    if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
    {
         if(!strcmp(playername, "Rodri99", true))
         {
             // play your sound for playerid.
         }
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)