[HELP]How can i make /play play in car im using audio plugin and only in car
#1

How can i make /play play in the vehicle so only me and who ever is in the car can hear it.This is my code right now.
Code:
dcmd_play(playerid, params[])
{
	#pragma unused playerid
	new
		audioid,
		bool:downmix,
		bool:loop,
		bool:pause;
	if (sscanf(params, "dddd", audioid, pause, loop, downmix))
	{
		SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /play <audioid> <pause (0/1)> <loop (0/1)> <downmix (0/1)>");
		return 1;
	}
	/*for(new i; i<MAX_PLAYERS; i++)
	{
	if(IsPlayerConnected(i))
	{
	Audio_Play(i,audioid, pause, loop, downmix);  //Use i instead of playerid here
	}
	}*/
	new vehicleid = GetPlayerVehicleID(playerid);
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
    {
   	Audio_Play(playerid,audioid, pause, loop, downmix);  //Use i instead of playerid here
	return 1;

   }
I want to make it so like if the player dat does /play in the vehicle can hear it i want for the people dats in the vehicle with him can hear it also.Not just him.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)