OnRangePointOf Answer + REP
#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


Messages In This Thread
OnRangePointOf Answer + REP - by Rodri99 - 31.12.2015, 23:00
Re: OnRangePointOf Answer + REP - by Donboo - 31.12.2015, 23:26
Re: OnRangePointOf Answer + REP - by Rodri99 - 31.12.2015, 23:31
Re: OnRangePointOf Answer + REP - by Donboo - 31.12.2015, 23:35

Forum Jump:


Users browsing this thread: 1 Guest(s)