|
Oui mates, I wanted to know how to play a sound through "PlayerPlaySound" to players nearby the person who enters a CMD. Can you give me an example? Thank you fucking much <3.
|
|
But that only plays it to the player, I want to it to play for the nearby players too!
|
CMD:sond(playerid, params[])
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i=0; i<MAX_PLAYERS; i++){
if(!IsPlayerConnected(i)) continue;
if(IsPlayerInRangeOfPoint(i, 10.0, x,y,z)){ //add radius
PlayerPlaySound(i, 36401,0.0,0.0,0.0); // add id sond
}
}
return true;
}