31.12.2015, 23:35
Add this code to an one-second timer.
- OR -
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.
}
}
}
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.
}
}
}