PlayerPlaySound To all Help
#1

How To PlayerPlaySound To all ? Pls Help Me

This Code Play Sound For 1 player
Код:
PlayerPlaySound(playerid, 3200, 0.0, 0.0, 0.0);
Help Me TnX
Reply
#2

Try with this.
Код:
stock PlaySoundForAll(SoundId,Float:X,Float:Y,Float:Z)
{
	for(new Slots = GetMaxPlayers(), P; P < Slots; P++)
	{
		if(IsPlayerConnected(P))
		{
			PlayerPlaySound(P,SoundId,X,Y,Z);
		}
	}
	return 1;
}
Reply
#3

Quote:
Originally Posted by Ranshand
Посмотреть сообщение
Try with this.
Код:
stock PlaySoundForAll(SoundId,Float:X,Float:Y,Float:Z)
{
	for(new Slots = GetMaxPlayers(), P; P < Slots; P++)
	{
		if(IsPlayerConnected(P))
		{
			PlayerPlaySound(P,SoundId,X,Y,Z);
		}
	}
	return 1;
}
No I Put This Not For Player Conect ! At This Code :
Код:
    if(GetVehicleModel(vehicleid) == 428 && ispassenger == 0)
    {
			HarvestJob[playerid] = 1;
            new name[MAX_PLAYER_NAME], string[200];
    		GetPlayerName(playerid, name, sizeof(name));
			format(string, sizeof(string), "{FF0000}[Dozdi] {FFFF00}MAshine BAnk {FF0000}Dozdide {FFFFFF}Shod {FF0000}Darhale  {FFFF00}Dozdidan ast! Bazikon : {FF0000}%s", name);
			SendClientMessageToAll(COLOR_WHITE, string);
            SetPlayerCheckpoint(playerid,-2806.4221,843.8745,45.0281,10);
            SendClientMessage(playerid,COLOR_RED,"{FF0000}[Dozdi]] {FFFF00}Police Ha DAr Kamin Hastand!");
            PlayerPlaySound(playerid, 3200, 0.0, 0.0, 0.0); <<<<<<<<<<<<<<<<<<<
            SetPlayerWantedLevel(playerid, 6);
        }
}
I Fixed Itttt__________________________________________
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)