Audio Stream How do i complete this?
#1

Hello, i'm very new to sa-mp and im in the making of a Roleplay gamemode. i've got a car engine command ect. but i would like to play an audo in a 5 meter range of when the player types /engine they will hear the vehicle engine from 3 meters!

My Vehicle code
Код:
{
		new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
		vehicleid = GetPlayerVehicleID(playerid);
		if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"This command can't be used in this vehicle.");
		GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
		if(engine == VEHICLE_PARAMS_ON)
		{   new string[128];
			format(string, sizeof(string), "* %s twists the key in the ignition, turning the engine off.", GetPlayerNameEx(playerid));
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			SetVehicleEngine(vehicleid, playerid);
		}
		else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
		{   new string[128];
			SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine starting, please wait...");
			SetTimerEx("SetVehicleEngine", 1000, 0, "dd",  vehicleid, playerid);
			format(string, sizeof(string), "* %s twists the key in the ignition, turning the engine on.", GetPlayerNameEx(playerid));
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		}
	}

I know how to add audio streams ect in but i would like to make it so like if the player is near other players they hear it to. within a 5 meter range.
Reply


Messages In This Thread
Audio Stream How do i complete this? - by saikumar - 10.06.2014, 22:46
Re: Audio Stream How do i complete this? - by NewbieHelper - 11.06.2014, 03:39

Forum Jump:


Users browsing this thread: 1 Guest(s)